Hopefully, I can communicate this odd question effectively.
I am using a Genesis theme, and have this little bit of code that adds descriptions to my WP custom menus.
/** Add description to secondary navigation */
add_filter( ‘walker_nav_menu_start_el’, ‘add_description’, 10, 4 );
function add_description( $item_output, $item, $depth, $args ) {$args = (array) $args;
if ( $args[‘theme_location’] === ‘primary’ ) {
return preg_replace( ‘/(<a.*?>[^<]*?)</’, ‘$1’ . “<span class=”menu-description”>{$item->post_content}</span><“, $item_output );
}
else {
return $item_output;
}}
All works perfectly until I get to the SPF forum page. On that page, it displays the menu descriptions, but below each description adds the word “Forums” below the menu description, colored as if it were a link, but it’s not. “Forums” happens to be the page title of my SPF forums page.
Without finding the cause, I created a page template that removed the WP primary navigation menus, and set that page template to the template for my SPF forum page, which seems to work fine. I don’t have to have the primary nav on the forums, since I can treat the forums like a landing page of sorts.
So my questions are:
1) is it ok to control the SPF forum page by setting a page template or will that break anything in SPF?
2) any idea why SPF would interact with my little bit of code?