Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have just created a widget and i am trying to implement a tabbed navigation in the wp backend but it just seems more difficult than writing all the php code!

The categories metabox is an example of what i am trying to achieve:

https://docs.google.com/file/d/0BwQTBas8n_7iOFllSG5QOFg5MTQ/edit?usp=sharing

share|improve this question
    
Google it and you will find how to implement it on front end. You can use same technique to implement it on back end. Example : wp.smashingmagazine.com/2013/04/04/… –  Vinod Dalvi Apr 18 '13 at 9:11
    
i've been googling a lot and i know how to write some jquery from scratch to achieve a similar result, it's just that i want to use the same method wordpress uses in its default metaboxes so as to keep ui consistency, thanks for your answer Dalvi –  Nicola Apr 18 '13 at 9:14
    
add comment

1 Answer

I checked the markup and core WordPress code to find out how it handles categories and came to the conclusion that all the categories are get loaded on page load and at a time either All Categories or Most Used is displayed by manipulating it using jQuery(on mouse click showing and hiding category-pop & category-all div).

In core wordpress file HTML markup for this is saved in /wp-admin/press-this.php file in #taxonomy-category div and jQuery is saved in /wp-admin/js/link.js file following this // category tabs comment.

By referring his you can develop your widget.

share|improve this answer
    
Thanks for your answers, after a lot of trial and googling i found a sample metabox from which i took parts of code and at the end it seems it is working. This is the sample metabox: github.com/PeteMall/Metabox-Tabs/blob/master/… –  Nicola Apr 18 '13 at 10:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.