WordPress.org

Support

Support » Plugins and Hacks » WordPress Popular Posts » [Resolved] How to exclude a post

[Resolved] How to exclude a post

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Author Hector Cabrera

    @hcabrera

    Hi there,

    At the time the plugin doesn’t offer any functionality to exclude posts, only categories. Might add this functionality on future releases.

    Hi Hector,
    I have a question related to the same issue. I’d like to remove the current post from the list of popular post.
    To make it clear if ‘post1’ is the most popular post, it will show in first position in the sidebar, then I click on the link and visit the ‘post1’ page and I still have the same ‘post1’ in first position in the sidebar. So the most popular post of my blog is linking to itself.

    I manged to get only posts from the same category showing with the code below, but I can’t figure out how to exclude the current post. Any idea? Thanks

    <?php
    $category = get_the_category($post->ID);
    $category  = $category[0];
    if (function_exists('wpp_get_mostpopular')) wpp_get_mostpopular("cat=".$category->cat_ID."&range=weekly&order_by=views&limit=4&excerpt_length=55&stats_comments=0"); ?>

    Plugin Author Hector Cabrera

    @hcabrera

    I have a question related to the same issue. I’d like to remove the current post from the list of popular post.
    To make it clear if ‘post1’ is the most popular post, it will show in first position in the sidebar, then I click on the link and visit the ‘post1’ page and I still have the same ‘post1’ in first position in the sidebar. So the most popular post of my blog is linking to itself.

    Someone else mentioned something similar some time ago. I believe that it’d be better to just remove the link from the post being viewed – that way, we can still show it on the list and avoid havint it linking to itself.

    What do you think?

    hey hector so when i can expect this feature from u ????

    Plugin Author Hector Cabrera

    @hcabrera

    I might post a test version here so you guys can try it, probably this upcoming weekend.

    Hi Hector,

    I think it would be better to remove the current post completely because the user is already reading the post. Plus, you may have duplicate content on the same page if you didn’t write a unique excerpt. (wordpress will take the first X words/characters).

    I was thinking more about something similar to the ‘exclude’ parameters in get_posts. Maybe you can add a post_id parameter in your plugin. For example, you already have the author parameter, so I guess if I write: author="-4" it will exclude posts from this author.
    With the post_id parameter we will be able to exclude the current post using something similar to what I have done for category.

    and one more thing y it wont pic the image if the image was not uploaded through the post is it possible that the plugin will pic the first image associated with the post.

    Hi Hector,

    Did you have time to look at it by any chance?
    Have a great weekend!

    Plugin Author Hector Cabrera

    @hcabrera

    Hi Nicolas,

    I will be posting a test version in a few hours, stay tuned!

    Plugin Author Hector Cabrera

    @hcabrera

    Alright people, just uploaded a new development version of the WPP plugin now. It contains the new Post Exclusion feature (among other things), so please test it and post your feedbacks here.

    @nicolas: the feature to remove a post from the list when viewed on single.php is still pending. Will let you know when it’s done.

    ok found it but it will be better if u provide exclude post check box on the post page so the post needed to be excluded just need to click on that check box and its done but still thanx for ur efforts buddy its just a suggestion….

    one more prob after putting the excluded post code and u click on save button it wont being shown in the exclude post text box and as u kept 10 post for popular post and when u exclude a post there only 8 left and wen u keep 12 post then it left 10 post. so plzz fix this problem…

    Plugin Author Hector Cabrera

    @hcabrera

    ok found it but it will be better if u provide exclude post check box on the post page so the post needed to be excluded just need to click on that check box and its done but still thanx for ur efforts buddy its just a suggestion….

    I like it better as it is now since that’s also how the category exclusion works. And you woulnd’t need to go to the Posts page only to exclude one or two entries, you can do it all from the widget interface. Seems more user-friendly to me, don’t you think?

    U kept 10 post for popular post and when u exclude a post there only 8

    Oh, good point. I’ll check that in a couple of hours.

    Thank you for your feedback!

    its taking daily views instead of the choice i m making ….

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘[Resolved] How to exclude a post’ is closed to new replies.
Skip to toolbar