• Hi WordPress users,

    Wordpress’s block > post list > includes the current post in the list. How can the current post be excluded from the post list query loop? Be ideal if I can just add this fix to the fuctions.ini.

    R

    • This topic was modified 2 years, 5 months ago by Jan Dembowski.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @robertfudge

    The Post List block, also known as the Query Loop, has an option in the Display Settings that allows you to enable an offset. This offset allows you to exclude the first x number of posts.

    In the video below, you can see me clicking through to select the Query block, click on the Display Settings icon, and set the offset to 1, which effectively removes the first/most recent post from the list.

    Thread Starter robertFudge

    (@robertfudge)

    Thank you @psykro.

    This functionality is a different that was I need.

    I need the ability to exclude only the current post from the Query Loop on the post. For example: I have a post (called “Super Cat”) at the bottom of that post I have a related post Query Loop that pulls the latest three post, I need the ability not to include the current post (called “Super Cat”) in the related post Query Loop.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove current post from query loop’ is closed to new replies.