I placed a Thrive Leads shortcode into the “After Header” hook. Basically its a info box with a text, image and a button who links to a specific post. Now this hook is shown on every page. But how can I hide this hook on that specific page I am linking too? So I don’t want to show the info box in the header. Is there a CSS hack that can do it?
Hi there, you can wrap you short code in a conditional – just add the page id or slug. GP 1.7 adds Display Rules to Hooks so this won’t be needed soon:
Don’t display if page:
<?php if ( ! is_page('ID') ) : ?>
This content is EXCLUDED from static pages
<?php endif; ?>
Don’t display if post:
<?php if ( ! is_single('ID') ) : ?>
This content is EXCLUDED from single posts
<?php endif; ?>