Site logo

Archived topic

is this possible

3 replies · Started by cliqous on November 26, 2014

Viewing posts 1–4 of 4

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

is this possible?

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.

thanks

You're welcome :)

This archived topic is closed to new replies.