• Resolved FabioG

    (@lando39)


    Hi,

    In a single custom post I’m trying to include a section which shows ‘Other posts’. I’m doing this via a shortcode and in the where clause of the shortcode I would like to exclude the current post so that the ‘other posts’ section doesn’t show the current post I’m visiting. I’m doing this via the following short code:
    [pods name="recipe" limit="3" where="ID NOT in ('{@ID}')" orderby="RAND()" template="Recipe List"]

    My issue is that this where clause simply doesn’t work and none of the posts show when I do this. Can someone suggest what I’m doing wrong here and what should be the correct where clause to allow me to display all posts except for the current one, please?

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Exclude current post from post list’ is closed to new replies.