WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Text Widget
Trying to get widget to show on a custom post type (2 posts)

  1. Alex Vasquez
    Member
    Posted 1 year ago #

    Okay, I'm not sure what I'm doing wrong. I'm trying to get a widget to show on a custom post type 'news-story'.

    I tried
    is_single(news-story))
    is_singular(news-story))
    is_singular('news-story'))
    is_single('news-story'))

    No dice.

    Site http://aryaka.wpengine.com/news-story/aryaka-delivers-on-the-promise-of-innovation-and-disruption-of-multi-billion-dollar-markets-for-optimization-of-enterprise-networks/

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

  2. Max Chirkov
    Member
    Plugin Author

    Posted 1 year ago #

    Hi there,

    the is_single() only checks post slug, post ID or post title - not the "type" of the post.

    For the post type use this:

    'new-story' == get_post_type()

    Hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic