• Hi,

    I just wanted to display my products slider in my site’s content area(not in sidebar) and thus I added a new widget area in the functions.php

    register_sidebar( array(
    ‘name’ => __( ‘postslide’, ‘twentytwelve’ ),
    ‘id’ => ‘post_slide’,
    ‘description’ => __( ‘An optional widget area for your site header’, ‘twentytwelve’ ),
    ‘before_widget’ => ‘<aside id=”%1$s” class=”widget %2$s”>’,
    ‘after_widget’ => “</aside>”,
    ‘before_title’ => ‘<h3 class=”widget-title”>’,
    ‘after_title’ => ‘</h3>’,
    ) );

    And to bring the widget in the site pages(especially in front page), I just added the code in my page.php

    <?php if (!function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘postslide’)) : ?>
    [ do default stuff if no widgets ]
    <?php endif; ?>

    After then, if I add something to this particular widget, it is showing in all the other pages other than the home page.

    Could someone please come fast to help on this?

    Thanks in Advance.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Home page not displaying up the new added widget’ is closed to new replies.