Site logo

Archived topic

GP Hooks conditional not working

19 replies · Started by Keith on August 23, 2017

Viewing posts 16–20 of 20

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

Cracked it

needed is_single() with id, name or slug!

Thanks for help in getting me there - eventually :-)

Cheers

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

Hi Tom

Yes that is what I meant I did in my email so already resolved :-)

Thanks

Awesome! :)

This archived topic is closed to new replies.