List category posts
Exclude current post (5 posts)

  1. pp74
    Posted 4 years ago #

    Hi everybody.
    I installed the plugin [List category posts] (version 0.18.3) to include at the bottom of a post a list of 'similar' posts (that is, posts that have same category of the one currently showed).
    I used the following shortcode:

    [catlist id=XX numberposts=5]

    where XX=is the category of the current post (eg. 29).
    The result is the list of 'similar' posts, but that list includes the current one too.
    So I tried this one:

    [catlist id=XX numberposts=5 excludeposts=<ID_OF_CURRENT_POST>]

    but I don't know how to set the value <ID_OF_CURRENT_POST> at runtime.

    Any help is appreciated.

  2. sobr-rf
    Posted 4 years ago #

    I have same problem ....

  3. abracadave
    Posted 4 years ago #


    Anyone have any suggestions on this problem. How can we set this parameter?

  4. sobr-rf
    Posted 4 years ago #

  5. strahd13
    Posted 3 years ago #

    figured this one out
    install the exec-php plugin
    add this code to post
    [catlist categorypage=yes excludeposts=<?php the_id();?>]

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • List category posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic