Back to Top

How to use jQuery UI tabs in a WordPress?

Jquery Tabs in wordpress without plugin

Before today, I was using a plugin for add jQuery UI tabs in WordPress. but today I have tried one thing to use jQuery UI tabs in WordPress without a plugin and extra JS files.

Latest WordPress 3.5 includes its own version of jQuery and many of the most common plugins. So We can develop tabbing functionality without using any plugins or extra JavaScript files.

Read about: To get Last auto increment id in WordPress

You do not need to package your own (especially not an older version) and instead use wp_enqueue_script() to pull in WordPress’s version.

Let’s dive into the code.

First of all, enqueue jquery core ui and ui tabs by adding action which is explained below.you can include below code into themes functions.php file

Now, you can write the script to call your tabs see below for a code.

Next and last is to place your HTML content for tabbing format and place your content and text you want to display.

Also Read: To get Last auto increment id in WordPress

That’s it.Now you can see your front with tabbing. you are done it without any plugin. 🙂

Thank you for reading.Feel free to share your thoughts! Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Comments (3)

  1. can you suggest how to make those tabs vertical???

  2. Where to put the bellow script?

    1. You can add script in footer or create one js file and add into it and enqueue that file into load_custom_scripts function

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular Posts

How to use WebService in PHP

Posted on 9 years ago

Bhumi

How to set Module Position in Joomla

Posted on 11 years ago

Bhumi

PHP 5 Abstract classes and Methods

Posted on 12 years ago

Bhumi