[Resolved] GP Hooks conditional not working

Home Forums Support [Resolved] GP Hooks conditional not working

Home Forums Support GP Hooks conditional not working

Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • #373206
    Keith

    Hi again

    Just had another thought…

    I tried swapping to a different page on this site that was a top level menu item (not a CPT either) and it worked OK. (Using is-page)
    Then I tried a second-level menu-item and that worked too.
    I did that because the page that is a CPT of Service is also a second/sub-level menu item – just to try and eliminate that. However seems it may be the CPT thats the root cause?

    cheers

    #373214
    Keith

    Cracked it

    needed is_single() with id, name or slug!

    Thanks for help in getting me there – eventually πŸ™‚

    Cheers

    #373379
    Tom
    Lead Developer
    Lead Developer

    Try: is_single( 'my-post-type-post' )

    #373384
    Keith

    Hi Tom

    Yes that is what I meant I did in my email so already resolved πŸ™‚

    Thanks

    #373387
    Tom
    Lead Developer
    Lead Developer

    Awesome! πŸ™‚

Viewing 5 posts - 16 through 20 (of 20 total)
  • You must be logged in to reply to this topic.