Focus Theme- Adding Widget Area Under Header

Community Forums Forums Design Tips and Tricks Focus Theme- Adding Widget Area Under Header

This topic is: resolved

This topic contains 1 reply, has 1 voice, and was last updated by  ATS 10 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43249

    ATS
    Participant
    Post count: 13

    Sorry for bothering, but it’s been too many hours already trying to implement different solutions.

    URL:  http://bilingualkidsrock.com

    Task: Add full width widget area under header.

    Done: functions.php

    //* Register after header widget area
    genesis_register_sidebar( array(
    ‘id’ => ‘after-header’,
    ‘name’ => __( ‘After Header’, ‘focus’ ),
    ‘description’ => __( ‘This is a widget area that comes under header for collecting emails’, ‘focus’ ),
    ) );

    Genesis Simple Hooks plugin: added this piece in genesis_after_header box, activated PHP

    <div class=”after-header”>
    <?php dynamic_sidebar( ‘after-header’ ); ?>
    </div>

    Question: How I can add to above code if  (is_home()) or something like that to display on home page only?

    It shows on all pages… I tried diffent things with home.php and functions.php but… nothing worked.

    Thanks in advance!

    http://bilingualkidsrock.com
    #43267

    ATS
    Participant
    Post count: 13

    ok, found solution by myself. the code for Simple Hooks  is:

    <?php
    if(is_front_page() ) {
    ?>
    <div class=”after-header”>
    <?php dynamic_sidebar( ‘after-header’ ); ?>
    </div>
    <?php
    }
    ?>

    or

    <?php
    if(is_home() ) {
    ?>
    <div class=”after-header”>
    <?php dynamic_sidebar( ‘after-header’ ); ?>
    </div>
    <?php
    }
    ?>

    depending how you set up your Home page in Reading section of General Settings.

    • This reply was modified 10 months, 3 weeks ago by  ATS.
    • This reply was modified 10 months, 3 weeks ago by  ATS.
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.