• Resolved 5ngua

    (@5ngua)


    Hello,

    Ideal Top posts and pages widget should have options to display only pages, only posts, and maybe options to exclude some posts or some pages…

    At least please allow by default to exclude some regular pages like Homepage, Blog or all pages… to be displayed. No one needs to show that his Homepage is the most popular one among the pages, this is really odd.

    I believe that many people have been looking for this improvements. Please review this 1 year old topic, nothing changes since.

    Thank you,

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • If you would like to remove all pages, you could replace the code starting on line 274 with:

    // hide private and password protected posts
    			if ( 'publish' != $post->post_status || !empty( $post->post_password ) || empty( $post->ID ) <strong>|| get_post_type($post_id)=='page'</strong> )
    				continue;

    That’s the work around that I found.

    I tried to distinguish the new code by making it bold, but it didn’t work. Just take out the tags so that it looks like this:

    `// hide private and password protected posts
    if ( ‘publish’ != $post->post_status || !empty( $post->post_password ) || empty( $post->ID ) || get_post_type($post_id)==’page’ )
    continue;’

    Thread Starter 5ngua

    (@5ngua)

    Thanks Liltiger, this maybe works. I hope at least the team can make it possible by default. Many people will benefit from that. Even though it’s just a small work, but it’s pretty inconvenience to make it over and over when Jetpack is updated.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Jetpack itself doesn’t include this option yet, but we’re still considering adding the option to exclude pages in a future Jetpack update.

    In the meantime, you can use this Top Posts widget:
    http://wordpress.org/extend/plugins/top-posts-pages-widget/

    Thread Starter 5ngua

    (@5ngua)

    Hi, I think there’s no need to make it serious. Just add the small snippet from Liltiger to the source code and that can save many people.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Better Top posts & pages widget’ is closed to new replies.