I used enfold child theme and then I have created a new widget area which is shown only on posts. I did this:-
In Single Post (single.php) I added below “<main class=’content units……..” code :
<?php if (!function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Top1’)) : ?><?php endif; ?>
Then in Functions (functions.php) I added:
if (function_exists(‘register_sidebar’)) {
register_sidebar(array(
‘name’=> ‘Top1’,
‘id’ => ‘top1’,
‘before_widget’ => ‘<li id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘‘,
‘before_title’ => ‘<h2 class=”offscreen”>’,
‘after_title’ => ‘</h2>’,
));}
The sidebar is working perfectly, but the output shows a dot on frontend for any widget I use on website. Example – I used text widget on single post – I see a dot before the title (or where title should be if title is empty)
Help me remove this dot. Why is it there?
Plus, I want css to keep the text within limits of post contents. Now it goes from left till above right sidebar and beyond page limit.
Hey simran1982,
I think that is because you are wrapping them in an li element:
‘before_widget’ => ‘<li id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘‘,
Maybe you could try a div instead? Don’t forgot to end the div as well, you haven’t ended the li element in your code.
Best regards,
Rikard