I have worked so hard to create a WordPress function and I got stuck. I am pretty sure that for some of you it will take 2 second to figure it out. I am familiar with WordPress and I know my way around it but i lack coding skills. Please help me correct this function keeping in mind that I want my banner and logo included and that’s what the: <div class="wrap"> and <div class="icon32" id="icon-index"><br></div>
is all about.
What I am trying to do is the followings: Have a Main menu item in WordPress Dashboard for both Admins and Subscribers to be displayed with the main Menu titled: “For Buyers” then add submenus with the following titles: Marketing Materials – First Time Buyers – Lead Generation – Ad campaigns.
Thank you so much, this is a wonderful community :).
add_action( 'admin_menu', 'register_my_custom_menu_page' );
function register_my_custom_menu_page(){
add_menu_page( "For Buyers", "For Buyers", "manage_options", "for_buyers", "add_buyers_function", '', 61 );
add_submenu_page( "for_buyers", " Marketing Materials", " Marketing Materials", "manage_options", "marketing_materials","add_marketing_materials");
}
function add_buyers_function(){
?>
<div class="wrap">
<div class="icon32" id="icon-index"><br></div>
</div>
<?php
}
//marketing materials for buyers wordpress menu
function add_marketing_materials(){
?>
<div class="wrap">
<div class="icon32" id="icon-index"><br></div>
</div>
<?php
echo "child page for marketing materials";
}
I did figure it out and solved it Thank you :).