[Resolved] is this possible

Home Forums Support [Resolved] is this possible

Home Forums Support is this possible

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #49197
    cliqous

    i would like to use a gp hook on the homepage
    only, but not on other pages.

    is this possible?

    #49314
    Tom
    Lead Developer
    Lead Developer

    Absolutely, we can use PHP for this.

    WordPress has conditionals which can be found here: http://codex.wordpress.org/Conditional_Tags

    So for the homepage, we could do this:

    <?php if ( is_front_page() ) : ?>
          This stuff will show up on the front page only.
    <?php endif; ?>

    Whenever using PHP in hooks, be sure to check the “Execute PHP” checkbox.

    #49341
    cliqous

    thanks

    #49382
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

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