Site logo

Archived topic

Remove elements using code

3 replies · Started by Mike on June 23, 2021

Viewing posts 1–4 of 4

Hi

Apologies if this is easy / already documented!

Scenario is: I have an object custom post type, thus have a single-object.php to display that specific single.

But - I have another bit of the site where I want to show the same information as single-object but in a modal, and without various elements (header, navigation, footer).

Normally I'd just pass in a querystring, say single-object.php?display=modal or similar - and then use this to hide stuff on the site.

I can do this in my child theme - but is there a more cunning way using GP hooks / filters?

Thanks

Mike

Hey David - thanks loads, this is really useful and exactly what I'm after.

cheers

Mike

Glad to be of help!

This archived topic is closed to new replies.