WordPress.org

Ready to get started?Download WordPress

Forums

List category posts
Exclude current post (5 posts)

  1. pp74
    Member
    Posted 3 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
    Member
    Posted 3 years ago #

    I have same problem ....
    http://www.sobr-rf.ru/

  3. abracadave
    Member
    Posted 3 years ago #

    Bump...

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

  4. sobr-rf
    Member
    Posted 2 years ago #

  5. strahd13
    Member
    Posted 2 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

About this Topic