This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Enabling Sidebar widget area in snapshot premium

11 years ago · Last reply by Andrew Misplon 11 years ago

Hi Im’ running the latest wordpress.
Website: awadphotography.com
Theme: Snapshot premium (latest)
Plugins:Page builder

Was just wondering if there’s a way to enable the sidebar through this theme?
I tried adding this code as advised here:
http://codex.wordpress.org/Widgetizing_Themes

/**
* Register our sidebars and widgetized areas.
*
*/
function arphabet_widgets_init() {

register_sidebar( array(
‘name’ => ‘Home right sidebar’,
‘id’ => ‘home_right_1’,
‘before_widget’ => ”,
‘after_widget’ => ”,
‘before_title’ => ”,
‘after_title’ => ”,
) );
}
add_action( ‘widgets_init’, ‘arphabet_widgets_init’ );

That did add the “Home right sidebar” widget area to the “widgets” under settings.
Howefver no matter what widgets i add to that widget area it won’t show up anywhere on my website.
What i would like to do utilimitally is add a widget in the top right corner of my website.
Thanks

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

1
  1. Andrew Misplon Staff 11 years, 8 months ago

    Hi Elie

    Please ensure that you’re working in a child theme when making these kind of customisations. After registering your widget area in the functions.php file of your child theme you’ll still need to render it.

    <?php if ( is_active_sidebar( 'home_right_1' ) ) : ?>
    <div id="secondary" class="widget-area" role="complementary">
    	<?php dynamic_sidebar( 'home_right_1' ); ?>
    </div>
    <?php endif; ?>

    Something like that. You could try inserting that after line 87 in single.php which should also be in your child theme.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread