Strip tags from sidebar
-
Hey all,
Can someone please tell me what I’m doing wrong?
I’m trying to remove the tags from a sidebar that calls in Widget/Archives.
This is my code in functions.php
if (function_exists('register_sidebars')){ register_sidebar(1, array( 'name' => 'Navigation', 'before_widget' => '<li id="%1$s" class="%2$s">', 'after_widget' => '</li>', )); register_sidebar(2, array( 'name' => 'Archives', 'echo' => false, 'items_wrap' => false, 'menu_class' => false, 'menu_id' => false, 'container' => false, 'container_class' => false, 'container_id' => false, 'before' => false, 'after' => false )); register_sidebar(3, array( 'name' => 'Footer', 'before_widget' => '<li id="%1$s" class="%2$s">', 'after_widget' => '</li>', )); }
This is how I’m calling it:
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(2) ) : else : ?> <?php endif; ?>
And this is the output:
<div id="sidebar"> <li id="archives-2" class="widget widget_archive"><h2 class="widgettitle">Archives</h2> <ul> <li><a href='https://localhost/mirfieldmarina/2014/08/'>August 2014</a> (4)</li> </ul> </li> </div><!--end sidebar-->
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Strip tags from sidebar’ is closed to new replies.