Support » Plugin: Scroll Triggered Boxes » Correct way to use 'if Post Type is'?

  • Resolved tapeasy


    Hi Danny,

    I’m trying to exclude a custom post type ‘reviews’ and only show the box on post types ‘post’ and another custom post type ‘question’.

    Specifying post, question in the text box against ‘if Post Type is’ isn’t working and the scroll box shows up on all post types, including reviews.

    I wonder if there is a different way to specify post types.

    Thanks so much for your help! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Danny van Kooten


    Hi Sonal,

    Is your “if post type is” rule defined as follows?

    post, question

    If it is and it’s still not working, please let me know. It would mean it’s a bug I’ll have to look into.

    In the meantime you should be able to use the following manual conditional rule.

    get_post_type() !== 'reviews'


    get_post_type() === 'post' || get_post_type() === 'question'

    Hope that helps!

    Hi Danny, yes, this is how the rule looks like:

    if Post Type is post, question

    I did not use single quotes around them.

    I’m afraid neither of the get_post_type rules are working either. is_single() works, but then every custom post type gets included with that. It would be wonderful to be able to exclude ‘reviews’, in my case.

    You’re doing an amazing job with this plugin and I’ll appreciate any pointers you can provide.


    I’ve got the same problem.

    My template has an FAQ custom post type and a Portfolio custom post type so the box is showing on these types of posts, which I don’t want.

    I tried – if Post type is …. get_post_type() === ‘post’

    The form doesn’t show up on the custom posts – but not on my blog posts either! I’m not a php expert so not sure what to put in that will work.

    Thanks, in advance 🙂

    Plugin Author Danny van Kooten


    Hi there,

    You can remove the get_post_type() call altogether. So, the following setting should just work.

    If post type is ... post

    The only thing you need to enter in the box is ‘post’. 🙂

    Hope that helps. If not, let me know!

    Awesome – fixed.

    Thanks Danny 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Correct way to use 'if Post Type is'?’ is closed to new replies.