WordPress.org

Forums

Post UI Tabs
[resolved] Place Tabs in Widget (2 posts)

  1. dukejames27
    Member
    Posted 2 years ago #

    Is it possible to create the tabs on the sidebar?

    http://wordpress.org/extend/plugins/put/

  2. Mark / t31os
    Moderator
    Plugin Author

    Posted 2 years ago #

    If your sidebar displays content from posts, pages or a custom post type, then yes, else no.

    Post UI Tabs is for converting content in the post editor into tabs, if you wish to create tabs in other areas of your WordPress site you may wish to seek out other plugins or look to creating your own tabs(which isn't as hard as you may think).

    Here's a few examples that are easy to follow.
    http://thethefly.com/2266/blog/wordpress-how-to/how-to-add-tabs-and-accordions-to-wordpress-without-a-plugin/
    http://www.gcostudios.com/2012/how-to-add-jquery-ui-tabs-into-wordpress/

    Although, something i'd note when following such guides is that you only actually need one call to wp_enqueue_script and not several.

    The following will suffice for loading your own JS file with the tabs initialization code(no need for all those additional calls).

    wp_enqueue_script(  'your-script-handle', 'PATH_TO_FILE', array( 'jquery-ui-core', 'jquery-ui-tabs' ), false, false );

    Where PATH_TO_FILE would need to be replaced with an appropriate function call to create the path to the file, for example ..

    get_stylesheet_directory_uri() . '/myjs.js'

    or

    plugins_url( '', __FILE__ ) . '/myjs.js'

    .. depending on where you are placing the file.

    Hope that helps. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Post UI Tabs
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.