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. Required fields are marked *

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

Most Popular Posts

Create Custom Page Tabs for Facebook Page

Posted on 6 years ago

Bhumi

Warning: Ignoring WordPress Can Be a Blunder

Posted on 5 years ago

Nick Carter

How to Use PHP Sessions to Store Data

Posted on 2 years ago

Bhumi

How to display ADMIN Toolbar in UI

Posted on 6 years ago

Bhumi