Home  ›  Troubleshooting  ›  Titles In The Menu

Titles In The Menu

If you have the option turned on to include Forum and Topic titles in the page title and you are seeing these titles also displayed in your menu or navigation area then the following options are available to you.
Please note that the title in question here is the WordPress ‘Page’ title, by default displayed above the forum content. The browser window title – also sometimes referred to as the ‘page title’ – is not subject to this problem and works independently.

This display problem is caused by a long standing WordPress bug. Simple:Press Forum does include code to try and circumvent the bug but this workaround can also be negated by theme code or even another plugin.

Change the Title Options

The easiest and quickest way to resolve this problem is to turn off the option to display forum and topic names in the page title. These options can be found at Forum ☛ Options ☛ Global Display Settings. Turning off forum and topic name will leave the WP page title in place and your menu will reflect that change.

Changing Your Theme

The most common WP template tags that theme authors use for displaying a ‘page menu’ are the tags

wp_list_pages()
wp_page_menu()

Both are affected by the same problem. In fact, the second simply calls the first one. Theme authors will typically – but by no means exclusively – use one of these tags in the header file of their theme and that is usually the first place to look for it. Alternatively, your page listing may appear in a sidebar.

Both of these template tags can take a number of parameters that control what and how the listing displays. One parameter allows for specific pages to be excluded from the list. it is therefore possible to exclude the forum page from the template tag display and then add a standard HTML link to the forum page to put it back into the page listing. In this way it can appear in the list but not be automatically generated by the tag. A fairly typical use of this template tag with a link to the forum page following would have this general format:

<ul>
    <?php wp_list_pages('...exclude page id parameter...'); ?>
    <li><?php sf_forum_homelink(); ?></li>
</ul>

This makes use of a Simple:Press Forum template tag that will display a standard HTML link to the forums front page.

Visit the WP Codex for details on the ‘wp_list_pages‘ and ‘wp_page_menu‘ template tags.

Article written by Yellow Swordfish on March 9, 2010 and last modified by Yellow Swordfish on March 9, 2010