• Resolved cuckingfookies

    (@cuckingfookies)


    I currently have widgets in my sidebar, but simply having widgets in my sidebar is causing each widget (i.e. Pages, Categories, Meta) to be a list item. Where would I find the file that is doing this?

    I would like to access this file so I can change it from

    <li id="categories-4" class="widget widget_categories"><h2 class="widgettitle">Categories</h2>		<ul>

    to what I did in /wp-includes/category-template.php for Categories that would be applied if I was not using widgets in my sidebar:

    $output = '';
    	if ( $title_li && 'list' == $style )
    			$output = '<h3 class="menuheader expandable">' . $r['title_li'] . '</h3><ul class="accordion">';

    My site is ahshotspot.com/multimedia. (Just a quick warning, it looks super unattractive right now.)

Viewing 3 replies - 1 through 3 (of 3 total)
  • /multimedia/wp-content/themes/white-as-milk/sidebar.php

    Thread Starter cuckingfookies

    (@cuckingfookies)

    What I’m looking for is a PHP code, not an HTML code. My sidebar mostly consists of this:

    <div class="sidebar">
    
    <?php 	/* Widgetized sidebar, if you have the plugin installed. */
    	if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    
    <?php wp_list_pages('title_li=Pages' ); ?>
    
    <?php wp_list_categories('show_count=1&title_li=Categories'); ?>
    
    <?php endif; ?>
    
    </div>

    I’m pretty sure that’s not the source of the problem. Nowhere does it cause each widget to be a list item, since the dynamic sidebar code replaces whatever I’ve put in between.

    What I’m looking for is the PHP code that causes each widget to be a list item. For example, I was successful in doing so in /wp-includes/category-template.php when I changed it from this:

    if ( $title_li && 'list' == $style )
    			$output = '<li class="categories">' . $r['title_li'] . '<ul>';

    to this:

    if ( $title_li && 'list' == $style )
    			$output = '<h3 class="menuheader expandable">' . $r['title_li'] . '</h3><ul class="accordion">';

    But since I’ve activated widgets in my sidebar, this no longer applies. So where could I find the file that’s making each widget a list item?

    Thread Starter cuckingfookies

    (@cuckingfookies)

    Ahh, I found it! It was simply in the functions.php file in my theme’s folder. Haha wow, that was simple…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sidebar Widget Troubles’ is closed to new replies.