Black Friday Sale! Get up to $30 off GP Premium! Learn more ➝

Reply To: How to disable GP Hooks for a specific page?

Home Forums Support How to disable GP Hooks for a specific page? Reply To: How to disable GP Hooks for a specific page?

Home Forums Support How to disable GP Hooks for a specific page? Reply To: How to disable GP Hooks for a specific page?

#108305
Tom
Lead Developer
Lead Developer

Good idea, Jean! I haven’t though of using return like that in the hooks.

Another option is to use !.

For example, if your page ID is “10”, and you want the hook to display on all pages but that one, you would do this:

<?php if ( ! is_page( 10 ) ) : ?>
      Stuff in here will display on all pages except page ID 10.
<?php endif; ?>

All WP conditionals can be used in GP Hooks: http://codex.wordpress.org/Conditional_Tags