Override sidebar menus in WordPress
Not so bad, working on congruence-inc.com with this template that had non-options side menus attached to the pages/posts. I didn’t want to dig though this guys layout generation code so i went in and added a simple if/then/else statement to manage when my cool links would show up. Only wanted them on a few pages associated to the content… whenever it hits page ID = x, it will call a function and print the desired menus, also getting rid of the extra widgets that would normally be there.
/// in the sidebar file
//check and see if a side menu needs to be added to the following pages.
//57 -> Building Career Equity
//58 -> Building A Pipeline Of Leaders
//59 -> Congruent Selections
//keep this above the loop below or else the $post value get changed up.
if( ($post->ID == '57') || ($post->ID == '58') || ($post->ID == '59')){sideMenus();} else {...widgets...}
///in the functions.php file
function sideMenus(){
$output = '
<div class="buildingEquityMenus">
Building Career Equity™<br />
Building a Pipeline of Leaders<br />
Congruent Selections<br />
</div>
';
echo $output;
}
Meh some how i broke the code pre block.. the a tags are converted into links for the sideMenus function..