WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Text Widget
[resolved] exclude specific IDs from a particular post type? (8 posts)

  1. SiteSubscribe
    Member
    Posted 1 year ago #

    Hi. Following your video example, I want to exclude post type 'product', but I only want specific ID's excluded.

    So I have condition:
    $arg==$post->post_type

    Then I have in the Slug/Title/ID:
    product

    As expected, that excludes all products.

    But I would like to exclude only product IDs:
    10910, 9515, 8962

    I tried using condition "Page", but my IDs weren't recognized as Page IDs.

    Please advise proper condition usage for this scenario.

    Thanks.

    http://wordpress.org/extend/plugins/advanced-text-widget/

  2. Max Chirkov
    Member
    Plugin Author

    Posted 1 year ago #

    Hi there,

    Use the default Page condition as you were, just remove spaces between page IDs:

    10910,9515,8962

    That should do it.

  3. SiteSubscribe
    Member
    Posted 1 year ago #

    I still can't get it to work.

    I tried these settings:
    Do NOT show on Page
    8962

    Also tried:
    Do NOT show on Post Type
    8962

    Also tried:
    Do NOT show on Page
    8962,7220

    (8962 is ID of custom post type Product)
    (7220 is ID of Page)

    In all cases widget still shows on all Pages and Products including IDs listed.

  4. Max Chirkov
    Member
    Plugin Author

    Posted 1 year ago #

    Make sure you don't have any caching of the pages enabled, or at least clear the cache after setting up the widgets. If cache is not the issue, can you give me a temporary admin access to your WP dashboard? If so, email me directly at max@phoenixhomes.com and I'll take a quick look. Thx!

  5. SiteSubscribe
    Member
    Posted 1 year ago #

    I did delete cache. Admin access on it's way. Thanks.

  6. SiteSubscribe
    Member
    Posted 1 year ago #

    Thanks Max for fixing my issue.

    For those following this post, I needed to use is_single(), which is Single Post option since I was trying to exclude custom post types by ID.

    [Resolved]

  7. SiteSubscribe
    Member
    Posted 1 year ago #

    delete

  8. SiteSubscribe
    Member
    Posted 1 year ago #

    delete

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.