WordPress.org

Ready to get started?Download WordPress

Forums

Posts in Page
[resolved] Hide Sticky Post (4 posts)

  1. ted84
    Member
    Posted 1 year ago #

    Hi, first I want to say this is a great plugin.

    I have an online store and I use this plugin to show specific related products by using [ic_add_posts ids='1,2,3'].

    However the problem is every time I do that, my post also display my sticky post. So it will shows post ID 1, ID 2, ID 3 + sticky post.

    I'm wondering how to get rid the sticky post.

    Anyway, I change
    <?php the_excerpt(); ?>
    to
    <?php
    global $more; // Declare global $more (before the loop).
    $more = 0; // Set (inside the loop) to display content above the more tag.
    the_content("More...");
    ?>

    in post_loop_template.php.

    Thanks in advance and sorry for my bad english.

    http://wordpress.org/extend/plugins/posts-in-page/

  2. Daniel Gilfoy
    Member
    Plugin Contributor

    Posted 1 year ago #

    Hello ted,

    I think eventually we'd like to allow a user to indicate they'd like to ignore sticky posts. I'll try and get an update out soon, but it's a short week for us here (Thanksgiving and the day after are off days). It'll probably be next week.

    In the meantime, you can prevent the sticky from being displayed with a snippet of code before and after the other code in the loop, like such:

    <?php if( !is_sticky( get_the_ID() ) ): ?>
      ... rest of the loop here...
    <?php endif; ?>
  3. Eric Amundson
    Volunteer Moderator
    Plugin Author

    Posted 1 year ago #

    Hey ted84,

    We've made an update to this plugin and will be testing it this morning and, hopefully, releasing an update that will solve your sticky posts issue before 11am PST.

    Cheers,
    Eric

  4. ted84
    Member
    Posted 1 year ago #

    Hi Daniel & Eric, I've tried version 1.2.1 and it's work like a charm, no more sticky post :-)

    Thanks a million for a lightning fast support & great work. God Bless

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic