WordPress.org

Ready to get started?Download WordPress

Forums

Genesis Featured Widget Amplified
[resolved] Exclude post by ID not working (8 posts)

  1. JSDavis82
    Member
    Posted 3 years ago #

    when using the widget to display posts within certain categories, listing a post ID in the field to exclude exclude by post ID, does not exclude that post.

    I'm using 0.6.6.

    Also, what is the diff between Exclude Terms by ID and Exclude by Post ID (and is post ID a comma separated list as well)?

    Last question, what is the meta key for in this widget?

    http://wordpress.org/extend/plugins/genesis-featured-widget-amplified/

  2. Nick the Geek
    Member
    Plugin Author

    Posted 3 years ago #

    The Exclude Terms by ID lets you skip specific terms. For example, if you wanted to pull in posts by tag but skip a specific tag you could select All Tags from the list and put the tag ID in the exclude terms field. This will skip any posts that have been assigned that tag. The default taxonomy is Category, so if you have "All Terms and Taxonomies" selected then the exclude terms field is for categories.

    The Post ID lets you skip specific posts.

    The meta key is used in the query to search for specific metakeys (custom field names). It can be used with the sorting options, so if you want to sort your posts into a specific order you can assign them a custom field "order" and assign a number to the field to sort them. Then select to sort (orderby) the posts by numeric metakey.

    As for the exclude not working. Are these sticky posts?

  3. JSDavis82
    Member
    Posted 3 years ago #

    Thanks for the descriptions on the details of how the plugin works.

    As for the post IDs not working, no the posts are not sticky. I'm using the post ID found in the url when editing the post. Is that the correct one?

  4. Nick the Geek
    Member
    Plugin Author

    Posted 3 years ago #

    Sorry for the delay on this. I had to go through several tests to figure out why the exclude isn't working, turns out that it is as simple as a space after post__not_in.

    This will be fixed in the 0.7 update, which I hope to have out next week, but you can apply the patch pretty easily. Search for "post__not_in" in the widget.php file and remove the space after the arg.

    $term_args['post__not_in '] = $IDs;

    becomes

    $term_args['post__not_in'] = $IDs;

  5. JSDavis82
    Member
    Posted 3 years ago #

    ah that fix worked perfectly. thanks for taking the time to pin down what the cause was. i hate when it's something so simple yet you just can't seem to find.

    thanks again!

  6. Nick the Geek
    Member
    Plugin Author

    Posted 3 years ago #

    You're welcome. Sorry it took a while to find.

  7. wadams92101
    Member
    Posted 3 years ago #

    Argh, struggled with this for 2 hours before I saw this. Oh well, at least its documented here.

  8. eslucky
    Member
    Posted 3 years ago #

    thanks for the fix. nice and easy!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic