WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
Need to exclude page from "popular posts and pages" (19 posts)

  1. jbadams
    Member
    Posted 1 year ago #

    I'm using the "popular posts and pages" widget to display a list of my most popular posts and pages (obviously!) on a page which is included in my main navigation.

    Unfortunately because I'm using the widget on a page rather than in a sidebar I'm getting a circular reference where the list includes the "popular articles" page where the widget is displayed.

    I'd really appreciate a way of excluding specific posts and pages from being displayed -- and I'm sure that I'm not the only one who would benefit.

    Absolutely fantastic plugin otherwise, with a great offering of features! Thank-you in advance for your time.

    http://wordpress.org/extend/plugins/jetpack/

  2. Tim Moore
    Moderator
    Plugin Author

    Posted 1 year ago #

    Thanks for the feedback! We'll look at this for a future update.

  3. jbadams
    Member
    Posted 1 year ago #

    Thanks a lot Tim, I'd really appreciate it!

  4. baggi-t
    Member
    Posted 1 year ago #

    Exactly the same request! I want to be able to exclude the front page, the blog list pages and contact page. I just want the most read list to show single posts and specific content pages.

    Thanks
    Tim, London

  5. wpstefan
    Member
    Posted 1 year ago #

    Hi,

    Same here. Of course it is important to be able to exclude pages in the "popular posts" widget. Why would I want to show pages in there...

    Stefan

  6. baggi-t
    Member
    Posted 1 year ago #

    Well Stefan,

    The page on my site that sees the biggest traffic is the front page – obviously, as this is where most visitors arrive. When visitors come into the site, they will then find that on widget display of the most popular pages, the number one link takes them straight back where they've just come from.

    The widget does not display the pages most popular for rich and engaging content, it displays the pages seeing the most traffic. Without the ability to exclude the front / landing page from the 'most popular' count, there's a danger it gets trapped in a positive feedback loop and no other page will ever occupy the number one spot.

    That is why I don't want certain pages to be counted in the 'most popular' widget.

    Tim, London

  7. jbadams
    Member
    Posted 1 year ago #

    Any update on whether or not this is likely to be added?

    I'm going to have to choose (or create -- perhaps simply by further filtering the output from your plug-in) an alternative plug-in if this feature isn't going to be added soon; it hinders efforts to present a professional image with my "popular posts" page regularly ranking highly on my "popular posts " page.

    @wpstefan: the issue is excluding specific pages, not just pages in general.

  8. stardaug
    Member
    Posted 1 year ago #

    I have to point this out... the original post was made 8 months ago. The last post 4 months ago - still no fix or addition to jetpack top posts widget to exclude specific pages/post - like the blog page or home page?? Really people? Other plugins are doing it out of the box. Why not jetpack?

  9. Saeed Salam
    Member
    Posted 1 year ago #

    my bad! i read it wrong!!

    Can't find a way to delete this entry, so removed the contents.

    sorry...

  10. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Jetpack itself doesn't include this option yet, but you can use this plugin instead:
    http://wordpress.org/extend/plugins/top-posts-pages-widget/

    We haven't forgotten about your suggestion though; I will post again here if we include this feature in a future Jetpack update.

  11. dorianinnes
    Member
    Posted 11 months ago #

    I found this post that should help everyone out in the interim. It allows you to remove pages from the widget, although a little more manually than normal:

    http://www.ramsukul.com/show-only-posts-in-jetpack-top-posts-pages-widget/

  12. RolandOfEld
    Member
    Posted 11 months ago #

    i am also wanting a solution to this.. i want to display both tpo pages and posts in my widget, i just want to exclude 1 page from that ranking which is my homepage (static page)

    can anyone help!?

  13. mw128
    Member
    Posted 11 months ago #

    You can go into /jetpack/modules/widgets/top-posts.php , look for the line towards the end of the file around line 275 that starts "if ( 'publish' !=

    and replace with some code that excludes by post ids:

    if ( 'publish' != $post->post_status || !empty( $post->post_password ) || empty( $post->ID ) || $post_id=='13849' || $post_id=='2568' || $post_id=='7231' )
    				continue;
  14. RolandOfEld
    Member
    Posted 10 months ago #

    what about by page?

  15. mw128
    Member
    Posted 10 months ago #

    @Roland: The same code applies to pages too. You have to get the postID of the page. Go to the Dashboard-->Pages and hover your mouse over the name of the page. Then look at the status bar in your browser (in mine it's at the bottom of the window) and you will see the postID there.

  16. RolandOfEld
    Member
    Posted 10 months ago #

    worked a treat! thanks!!!

  17. mw128
    Member
    Posted 10 months ago #

    You're welcome! The only problem is that until they add this functionality, you'll have to keep re-doing this code every time you update Jetpack.

  18. RolandOfEld
    Member
    Posted 10 months ago #

    can it be added to a child theme?

  19. mw128
    Member
    Posted 10 months ago #

    I'm sure it probably could but it would take some thinking / troubleshooting and right now I don't have time. Anyway hoping that Jetpack will do it for us. Or maybe a third party will come out with a Top Posts & Pages of their own that's even better.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic