WordPress.org

Ready to get started?Download WordPress

Forums

WP Title 2
Title2 overriding menu entries for current page (5 posts)

  1. Sith Lord Goz
    Member
    Posted 2 years ago #

    I think the Title2 filtering of the_title() is causing menu items to have their value of the_title overwritten by the current page when the Title2 heading happens to match the current page.

    Example:
    I have a WP nav menu with a menu element linking to a page with the WordPress title "Contact".
    If I create a new page, and set the WordPress title to "TEST" and the Title2 title to be "Contact", then navigate to that page - the menu item above will display TEST and not "Contact"!

    It seems that when WP is doing apply_filter for displaying the menu, if it finds the current page has a matching Title2 title, it using THAT WordPress title for the menu item.

  2. Sith Lord Goz
    Member
    Posted 2 years ago #

    Looks like this is a bug in version 3.6 (probably part of the "WP3.0+" requirement change).

    I downgraded to v3.5.1 of WP Title 2 (didn't change my WP version - still running the latest 3.2.1) and now the bug is gone. I'm guessing there is a problem in the plugin integrating with wp_nav_menu() since that is the add_filter call that is causing the menu problem I described.

  3. Sith Lord Goz
    Member
    Posted 2 years ago #

    BUMP this bug is still present. Just set up a new site - no content, bug still exists.

  4. Ann Pierson
    Member
    Posted 2 years ago #

    I know this is a little old but I haven't upgraded to 3.4 just yet but in 3.3.2 I've gone in and edited the wp-title-2.php in the plugin folder and removed this line

    add_filter('wp_nav_menu','wptitle2_list_pages',999);

    it's about halfway down. This seemed to solve the problem with displaying the wrong title in the custom menu.

    Doesn't seem to effect anything else.

  5. Sith Lord Goz
    Member
    Posted 2 years ago #

    @Ann Pierson
    It may be old, but still helpful - thanks! Confirmed the fix seems to work in WP 3.4.1.

    Would be nice if the plugin author could comment on the hook and why it's in there - but I agree it doesn't seem to mess anything else up that I've found.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags