• Resolved Paul Skip Brown

    (@paul-skip-brown)


    Hi Héctor, I’ve been using the plugin for a while and just upgraded to the latest version. I’ve had to remove it from my main pages but have loaded it on a test page for you to see at http://skipology.com/temporary-test-page/ . There are a couple of issues (1 of 2):

    1. I use non-breaking space –   – on my post titles and you can see the plug-in doesn’t like them. No issues anywhere else and the previous version I was using was fine (I believe 2.3.2).

    I’ve removed all custom CSS to ensure the output is pure. My PHP is version 5.3.27

    http://wordpress.org/plugins/wordpress-popular-posts/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Paul Skip Brown

    (@paul-skip-brown)

    Apologies non breaking space code not showing above. I use  

    Thread Starter Paul Skip Brown

    (@paul-skip-brown)

    I may have found the problem but I can’t understand why or what the solution is. In my functions.php I have the following…


    // stop brackets in titles appearing on own line
    function clean_orphan_titles($content){
    $array = array (
    '{ ' => '{ ',
    ' }' => ' }'
    );
    $content = strtr($content, $array);
    return $content;
    }
    add_filter('the_title', 'clean_orphan_titles');

    When I manually edit a title and add the   directly the plugin renders it fine but when the function does it the plugin doesn’t seem to like it. Can you offer any guidance? Like I say there were no issues with the previous version and no issues with titles in other widgets or plugins.

    Thread Starter Paul Skip Brown

    (@paul-skip-brown)

    To clarify the array part hasn’t displayed properly it is…

    '{ ' => '{&npsp;',
    ' }' => '&npsp;}'

    Thank you.

    Thread Starter Paul Skip Brown

    (@paul-skip-brown)

    I have discovered that if I replace return $content; with return htmlspecialchars($content); in my function the plugin output appears to render fine. The problem is the rest of my site then displays all the   – its a bit like they are operating opposite each other. Can you help – I looked at the plugin code but couldn’t really see what might need adapting.

    Thank you Héctor.

    Thread Starter Paul Skip Brown

    (@paul-skip-brown)

    Well unless something leaps out I think this can be ignored. I have manually edited my posts to remove the error. Seemed quickest way 🙂

    Plugin Author Hector Cabrera

    (@hcabrera)

    Hi Paul, sorry for not replying earler. I’ve seen your other topics as well already.

    Since you seem to have resolved the issue yourself, I’m marking this topic as fixed (unless you need further assistance with this, if so please feel free to mark it as unresolved again and post back so I can notice it).

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Issue with non-breaking space  ’ is closed to new replies.