this is my update code
if (is_admin())
{
add_action('admin_menu', 'user_menu');
}
function user_menu()
{
add_menu_page('Pesananku', 'Pesananku', 'subscriber', 'userslug',
'user_funct',get_template_directory_uri().'/img/favicon.ico',22);
}
function user_funct()
{
?>
<h2 class="nav-tab-wrapper">
<a href="#tab1" class="nav-tab">Tab #1</a>
<a href="#tab2" class="nav-tab nav-tab-active">Tab #2</a>
<a href="#tab3" class="nav-tab">Tab #3</a>
</h2>
<div id="tab1"><!--content tab1--></div>
<div id="tab2"><!--content tab2--></div>
<div id="tab3"><!--content tab3--></div>
<?php
}
i want ‘user_funct()‘ create tab with styling wordpress like this
http://postimg.org/image/h3nttjhof/
how to create different content with link tab menu
Thanks
Here is how you can go about it;
First, you need to create a function that create the structure depending on the current tab selected:
Then in the callback function called to display the page which will contain the tabs, you need to use this function like that:
Also then you call the page, you can add a GET value called
tab
corresponding to the tab you want to display, e.g.: