New Landing How can we help? Themeforest Theme Support Neighborhood Adding Custom Widget Area to homepage

Viewing 2 posts - 1 through 2 (of 2 total)
  • #269211
    haagmeister
    Member
    Post count: 39

    I have added the code below to the locations listed below and the widget is not displaying on the homepage.

    Child functions.php only code in it.

    <?php
    // Custom widget area.
     register_sidebar( array(
        'name' => __( 'Instagram Widget Area'),
        'id' => 'instagram-widget-area',
        'description' => __( 'An optional custom widget area for your site', 'neighborhood' ),
        'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
        'after_widget' => "</li>",
        'before_title' => '<h3 class="widget-title">',
        'after_title' => '</h3>',
    ) );
    ?>

    Also have added this line to the index.php where I wanted the widget to display

    <?php
          if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Instagram Widget Area') ) : ?>
    <?php endif; ?>
    #269507
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Although we can’t support user customizations it seems the code in the index.php is incorrect. Guess it should be like this in the place where you want to show it.

     if ( function_exists('dynamic_sidebar') {
         dynamic_sidebar('Instagram Widget Area') );
    } 

    -Rui

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register