how to get rid of a list item that seems to be built into the Starkers theme
# February 16, 2012 at 10:42 am
I am working on my first WP site – using the Starkers theme – and have run into a problem I hope someone here can help with. I’m stumped.
Here’s my test page:
the side menu has a
which is, for some reason I can’t figure out, inside a list item.
I have edited down sidebar.php – there is no list stuff there. Where is this list item coming from? What should I be looking at?
Here is sidebar.php as it is now:
* The Sidebar containing the primary and secondary widget areas.
* @package WordPress
* @subpackage Starkers
* @since Starkers 3.0
/* When we call the dynamic_sidebar() function, it'll spit out
* the widgets for that widget area. If it instead returns false,
* then the sidebar simply doesn't exist, so we'll hard-code in
* some default sidebar stuff just in case.
if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
< ?php endif; // end primary widget area ?>
So, thanks in advanced for your help.
Sandy# February 16, 2012 at 11:36 pm
That’s how WordPress renders the widgets as seen here: http://codex.wordpress.org/Function_Reference/dynamic_sidebar
You can edit how the widget renders by editing your functions.php using the arguments found here: http://codex.wordpress.org/Function_Reference/register_sidebar# February 17, 2012 at 1:31 pm
I am not sure what the problem is. I understand you’d prefer the
tag not to be in a list, but is there a specific reason why? I believe the reason why WordPress is set up like that is so that you’ll have more control over the code elements. You can use css to style your list elements any way you’d like.# August 13, 2012 at 11:59 am
I have opened functions.php and now have all the widgets set to
'before_title' => '
'after_title' => '
but somehow that list item is still making its way in … what am I missing? Where do I find this thing?
The problem here is not how this looks – I’ve got that list item styled so it doesn’t show.
There are two problems –
1. Anyone using a screen reader (a blind or low-vision user) is going to HEAR the list item and I don’t want to fill the page with miscellaneous cruft for them to work through.
2. The page doesn’t validate with a free-floating list item in it.
thanks, Sandy# August 13, 2012 at 2:12 pm
Hi Sandy – to make sure your changes to functions.php have been made, try changing the class title to ‘fun-test’ and making sure that it changes on the website.
Also, it looks like you need to be using the before_widget and after_widget to target the list items themselves. http://codex.wordpress.org/Function_Reference/register_sidebar
You must be logged in to reply to this topic.