WordPress.org

Ready to get started?Download WordPress

Forums

FV Simpler SEO
[resolved] Problems with substituting (short) menu titles containing special characters (3 posts)

  1. vbbp
    Member
    Posted 1 year ago #

    Dear all,

    I am using the FV Simpler SEO plugin to also replace longer page/post titles for navigation menus (wp_nav_menu) by the short titles / menu labels FV Simpler SEO provides. In general, this feature works.
    But once it comes that the (long) title contains an HTML special character (e.g., "&" like in "find & book", also a single dash), the plugin does not replace the long title.
    The reason is that the string comparison of the function fvseop_filter_menu_callback($matches) fails:

    The comparison in line 2556
    if ($my_post->post_title == $matches[6]) {
    fails. For the case of "find & book" as a title, the string "find & amp; book" (please imagine that there is no space between "&" and "amp;", but the forum does not show the right string otherwise...) and "find &amp#038; book" are compared which obviously are not the same. Therefore, the string comparison fails and the long title will not be replace by the short menu label. Does anybody have an idea how to solve the source of this error? Of course, I could modify the string comparison, but the string "&amp#038;" looks odd and I'd like to fix the problem where this string is generated...

    Thanks for your help,

    vbbp

    http://wordpress.org/extend/plugins/fv-all-in-one-seo-pack/

  2. vbbp
    Member
    Posted 1 year ago #

    My current work-around is to replace line 2556:

    Instead of
    if ($my_post->post_title == $matches[6]) {

    I am using
    if (wptexturize($my_post->post_title) == $matches[6]) {

  3. FolioVision
    Member
    Plugin Author

    Posted 1 year ago #

    Hi VBBP,

    Thanks for posting your issue and the solution.

    We'll include test and include it in our next release.

    For the future, we would have answered faster if you'd posted in our support forum for FV Simpler SEO: http://foliovision.com/support/fv-simpler-seo/

    Thanks for using FV Plugins

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic