• cmillar

    (@cmillar)


    Hi, I’ve just started with Genesis/Parallax Pro and have a multisite started successfully.

    However, being a novice in the world of programming, I need to check to see what I’m doing wrong here.

    I want to have a widget registered after the header (so that I can use a custom menu, like SuppaMenu or something like that)

    What I’ve done:
    – have added this to the functions.php in my multisite theme/copy at the bottom of the functions.php:

    genesis_register_sidebar( array(
    ‘id’ => ‘after-header’,
    ‘name’ => ‘After Header’,
    ‘description’ => ‘This is a sidebar that goes after the header.’,
    ) );

    – in your ‘Simple Hooks’plugin, I have put this in the box for the
    genesis_after_header Hook:

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

    Questions:
    – is this correct so far?
    – should I be placing this code in the functions.php text of the ‘genesis’ theme, or is it correct to place it in the functions.php of the child theme?

    When I check off both ‘Execute…’ boxes and ‘Save Changes’, I don’t see any new widget area showing up in my Dashboard/Appearance/Widgets.

    Any help and guidance is most appreciated!

    Thank you!

    https://ww.wp.xz.cn/plugins/genesis-simple-hooks/

Viewing 1 replies (of 1 total)
  • Plugin Support Nick C

    (@modernnerd)

    Hi @cmillar

    Your new “After Header” widget area should appear in Appearance → Widgets as soon as you add the genesis_register_sidebar() code in your theme’s functions.php. (Even before you’ve added any code to the Genesis Simple Hooks areas.)

    Have you definitely added that code to the correct theme’s functions.php file? Have you activated that theme from one of the multisite sites? It may be worth double-checking just to be sure.

    If you can get the After Header widget area to appear correctly and add a widget there, the code you’ve added in the genesis_after_header hook area is correct, and you should see the widgets below your header bar.

    (With Parallax Pro, the After Header widget area will need some extra CSS styling at larger screen widths to make it appear below the header bar. That’s because Parallax uses a “sticky” fixed header, so your new widget area will appear behind the header by default and be hidden by it – you’ll only see widgets you add to that section at small screen widths, where the header is no longer sticky.)

    – should I be placing this code in the functions.php text of the ‘genesis’ theme, or is it correct to place it in the functions.php of the child theme?

    You should make all modifications to the child theme, just as you’ve been doing. That way, updates to Genesis won’t overwrite your theme modifications.

Viewing 1 replies (of 1 total)

The topic ‘Is this correct?’ is closed to new replies.