I want to place an advert on the side bar, but the widget area appears in the wp-admin panel(appearance>widgets)
However, when I place my ad in the Side bar widget area, it does not appear on the site.
I used the code below to create the widget area and placed it in fuctions.php file of my theme. Where am I going wrong?
if (function_exists('register_sidebar')) {
register_sidebar(array(
'name' => 'Sidebar Widgets',
'id' => 'sidebar-widgets',
'description' => 'Widget Area',
'before_widget' => '<div id="one" class="two">',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>'
));
}
I'll be grateful.
Below is my page template.
<?php
/**
The template for displaying all pages.
*/
get_header();
?>
<div id="main" class="<?php echo $solid_content_class; ?> clearfix" role="main">
<?php
do_action('solid_before_content');
while ( have_posts() ) : the_post();
get_template_part( 'lib/content/content', 'page' );
endwhile; // end of the loop.
do_action('solid_after_content');
// If the theme supports comments in pages and comments are open or we have at least
one comment, load up the comment template
if( solid_theme_supports( 'comments', 'pages' ) && ( comments_open() || '0' !=
get_comments_number() ) ) comments_template( '', true );
?>
</div><!-- #main -->
<?php if( $solid_sidebar_location === 'left' || $solid_sidebar_location === 'right' )
{ ?>
<aside id="sidebar" class="sidebar <?php echo $solid_sidebar_class; ?>">
<div id="sidebar-main" class="sidebar">
<?php get_sidebar(); ?>
</div><!--sidebar-main-->
</aside>
<?php }
get_footer(); ?>'