Show menu only if_page is

Have you tried adding the is_page() conditional like this: if( has_nav_menu( ‘smone-menu’, ‘responsive’ ) && is_page(array( 10,11 ))) {

2 wordpress site same database

I would look into using HyperDB instead. This would allow you to pull data from several databases while one is replicated as the “master” database. http://wordpress.org/plugins/hyperdb/ From the description page of the plugin: It supports: Read and write servers (replication) Configurable priority for reading and writing Local and remote datacenters Private and public networks – … Read more

Add menu headings to WordPress sub menus

I ended up removing that code from my functions.php file and used jQuery instead. Here’s how I took care of it, if anyone wants to know: $(‘.menu-item-has-children > a’).each(function(){ var submenuHeading = $(this).text(); $(‘.sub-menu’, ($(this).parent(‘.menu-item-has-children’))).prepend(‘<h3>’ + submenuHeading + ‘</h3>’); });

How to add scroll IDs to WordPress menu anchors

Thank god.. i’ve solved it my own. this is the function i used to update the anchor tags. function my_walker_nav($item_output, $item, $depth, $args) { $menu_locations = get_nav_menu_locations(); if(!empty( $item->description )) $description = $item->description; else { $description = ”; } if ($item->menu_order == 1){ $item_output = preg_replace(‘/<a /’, ‘<a data-scroll-nav=”‘.$description.'” ‘, $item_output, 1); } return $item_output; … Read more

Removing a page from the header menu

I manually created a menu under Appearance->Menus and then assigned this as the Primary Menu. This worked, but required me to manually reproduce the structure of the menu: The structure created by assigning a parent in each page’s admin is now simply ignored. I would still like a way to use the default menu, which … Read more

Link from navbar to categories

To show all categories on a page, you will have to create a new page template. <?php /** * Template Name: Categories Page **/ get_header(); ?> <!– content –> <div id=”content”> <ul class=”category-list”> <?php wp_list_categories( ‘title_li=’ ); ?> </ul> </div> <!– / content –> <?php get_footer(); Now create a new page for categories in WordPress … Read more