Site logo

Archived topic

Page Specific Hooks

1 reply · Started by Aaron Redman on July 11, 2014

Viewing posts 1–2 of 2

Hi Tom,
I was wondering if I can specify that the GP Hooks only apply to certain pages? Is there some simple code I can insert?
Thanks!
Aaron

Hi Aaron,

You can use WordPress PHP conditionals in the hooks as long as you select Execute PHP.

http://codex.wordpress.org/Conditional_Tags

As an example:

<?php if ( is_page( 'page-slug' ) ) : ?>
Some content in here which will show up on yourwebsite.com/page-slug
<?php endif; ?>

Be careful with PHP - double check everything as it can be very picky and cause nasty errors.

Tom

This archived topic is closed to new replies.