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 *

Most Popular Posts

How To Reset resourceID in MODx

Posted on 5 years ago

Bhumi

How does CI/CD works on AWS?

Posted on 1 year ago

Bhumi

Overview of ECMAScript 6 new Features

Updated 18 years ago

Bhumi

Getting started with Amazon Web Services

Updated 18 years ago

Bhumi

Facade implementation in Laravel

Updated 18 years ago

Bhumi

The Reader’s Poll – June 2015

Posted on 2 years ago

Bhumi

The Reader’s Poll – August 2014

Posted on 3 years ago

Bhumi

The Reader’s Poll – June 2014

Posted on 3 years ago

Bhumi

The Readers’ Poll – May 2014

Posted on 3 years ago

Bhumi

The Readers’ Poll – August 2013

Posted on 4 years ago

Bhumi