badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Adding a widget area with hooks

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17527
    Kimberly
    Member

    With Interface Pro is there any “hooks” used with the theme? I’m trying to use “__after_header” and it’s not showing anything. Can you help?

    I’m trying to add a widget area to a few places and it requires hooks for calling the new sidebar i.e.

    // Adds a widget area.
    if (function_exists(‘register_sidebar’)) {
    register_sidebar(array(
    ‘name’ => ‘Extra Header Widget Area’,
    ‘id’ => ‘extra-widget-area’,
    ‘description’ => ‘Extra widget area after the header’,
    ‘before_widget’ => ‘<div class=”widget my-extra-widget”>’,
    ‘after_widget’ => ‘</div>’,
    ‘before_title’ => ‘<h2>’,
    ‘after_title’ => ‘</h2>’
    ));
    }

    // Place the widget area after the header
    add_action (‘__after_header, ‘add_my_widget_area’, 0);
    function add_my_widget_area() {
    if (function_exists(‘dynamic_sidebar’)) {
    dynamic_sidebar(‘Extra Header Widget Area’);
    }
    }

    #17543

    Hi Kimberly,
    You need to change a lots of coding. You need to create a child theme for it to be safe from updating to our new version. So we can’t provide a full support for this. So you need to hire a developer to fix the issue.

    Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.