Support » Fixing WordPress » php if else and showing hiding widgets depending on page

  • ok im trying to get some of my widgets to show only on the home page, ihave the right sort of code but dont know how to cobble it to gether…obvioulsy o dont want t say hello word but im sure youll get the idea….

    The one that says if (currently saying hello world)

    <?php
    if ( is_page( array (22,'Home') ) ){
    echo "Hello World";
     } ?>

    and the widgetizer one:

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : ?>
    <?php endif; ?>

  • The topic ‘php if else and showing hiding widgets depending on page’ is closed to new replies.