[Resolved] Page Specific Hooks

Home Forums Support [Resolved] Page Specific Hooks

Home Forums Support Page Specific Hooks

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3718
    Aaron Redman

    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

    #3719
    Tom
    Lead Developer
    Lead Developer

    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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.