Site logo

Archived topic

PHP conditional statement and Add-on GP hooks

2 replies · Started by Nadia on September 13, 2016

Viewing posts 1–3 of 3

Hi

I am struggling getting this right. I would like to display a different slider on different pages. I have tried many solutions found on the knowledge base but none work.

So far, for testing purposes, I have this very basic code in "Before Header Content". But it displays the slider on all pages. Why?
Note: "Excute PHP code" is not checked. Is it required? (When I enable it, I get a 500 server error - what is it for?)

*******
<?php if ( is_home() ) : ?>
[metaslider id=43]
<?php endif; ?>
*******

Thanks!

Hi

After reading the support forum, I have managed to resolve the crash issue (by saving the permalink!) and enabled PHP, it seemed to work now.

Problem solved!

Glad you found the solution!

This archived topic is closed to new replies.