WordPress.org

Ready to get started?Download WordPress

Forums

php if else and showing hiding widgets depending on page (1 post)

  1. oldbag66
    Member
    Posted 5 years ago #

    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; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic