• Hello

    I have a simple if/else condition that I just cant seem to get right. I have it half working in that all the pages other than those specified as is_page are displaying correctly ie they call gallery.php and not the image but the pages that are specified as is_page display both the image and gallery.php where they should only be displaying the image. Please help.

    Here is my code:

    <?php
    if (is_page(‘apparel’)) { echo ‘<img src=”https://website/featured/image_apparel.jpg”>&#8217;; }
    if (is_page(‘automotive’)) { echo ‘<img src=”https://website/featured/image_car.jpg”>&#8217;; }
    else include (ABSPATH . ‘/wp-content/plugins/featured-content-gallery/gallery.php’); }
    ?>

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP If / else condition not working for me’ is closed to new replies.