WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
[resolved] Popular Posts Displays the same title as the Current Post title (7 posts)

  1. drayks
    Member
    Posted 2 years ago #

    Every popular Post in the list Display the exact same title as the current post being viewed.

    http://www.globalnewspointer.net/special-report-how-is-russia-enhancing-its-defense-relations-with-israel

    Any idea?

    Thanks

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

  2. Héctor Cabrera
    Member
    Plugin Author

    Posted 2 years ago #

    Hi drayks,

    Just checked your URL and didn't notice that.

  3. drayks
    Member
    Posted 2 years ago #

    Yeah i fixed it.

    Im not sure how, i just comented this line out from the widget code

    $tit = apply_filters('the_title', $tit);

    Im not usre what it does but it looked suspicious :)
    --line 1315 wordpress-popular-posts.php

    Thanks for the reply

  4. Héctor Cabrera
    Member
    Plugin Author

    Posted 2 years ago #

    That line simply strips down HTML code and other stuff that should not be in the title. Odd. I'm not able to reproduce that, either.

  5. drayks
    Member
    Posted 2 years ago #

    It only happens on the post page, on any other page it works.

    It might be a conflict with the template, because it does alot of custom stuff to the contet before it prints it.

    Its like the plugin is using the same Variable for the titles (in the html strip part) with the Main Post Title Variable. (Protected Variable?)

    If the main posts Title is "Hello" then all of the popular Post Titles in the sidebar say "Hello".

  6. Héctor Cabrera
    Member
    Plugin Author

    Posted 2 years ago #

    Hmm that could explain it. Would need to check theme's code to find out, however it'd be probably easier to switch to a different one for a second and see if the problem persists.

  7. drayks
    Member
    Posted 2 years ago #

    Yeah, i would do that but its not my website, anyway stripping the tags from the title has solved another problem.

    Some titles had the &amp tag in it, and stripping that caused some problems with some titles.

    Im pretty sure it has something to do with a common Global variable.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic