Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7775181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:33:52+00:00 2026-06-01T17:33:52+00:00

I have sidebar and when I add the components to it, the heading get

  • 0

I have sidebar and when I add the components to it, the heading get added inside the li items of ul, making it look ugly. How do I overcome this. Unfortunately I have little or no knowledge of both wordpress and php.

here is how I get it in firebug:

<li class="widget widget_categories" id="categories-8"><h2 class="widgettitle">Categories</h2>
        <ul>
    <li class="cat-item cat-item-1"><a title="View all posts filed under Uncategorized" href="http://localhost/wordpress/wordpress/?cat=1">Uncategorized</a>
</li>
        </ul>
</li>

This is what I have in sidebar apart from some static html ul li pieces:

<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar() ) : else : ?>
        <ul class="ul-cat">

        <?php wp_list_categories('show_count=1&title_li='); ?> 




        <?php wp_get_archives('type=monthly'); ?> 
</ul>       
        <?php endif; ?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:33:54+00:00Added an answer on June 1, 2026 at 5:33 pm

    To use wp_list_categories and wp_get_archives inside your sidebar.php you can follow
    wp_list_categories and wp_get_archives.

    If your theme supports dynamic sidebar then you can remove wp_list_categories and wp_get_archives function calls from your sidebar.php and can use dynamic widgets from WordPress admin > Appearance > widgets and add Categories and Archives widgets to your sidebar.
    This is only an example, basically resides inside functions.php, generates dynamic widgets

    if ( function_exists('register_sidebar') )
    register_sidebar(array(
        'name' => 'Sidebar',
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
        'after_widget' => '</li>',
        'before_title' => '<h2 class="widgettitle">',
        'after_title' => '</h2>'
    ));
    

    If you leave before_title and after_title blank as follows

    'before_title' => '',
    'after_title' => ''
    

    Then your h2 will be gone.

    Note: In your question you mentioned h3 but in your generated HTML code I saw h2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been told that I should add a sidebar to one page of
I have this sidebar code <li><a href=/restaurant_pos><span>Restaurant POS Systems</span></a> <ul> <li><a href=/restaurant_pos>Restaurant POS Systems</a></li>
I have this website http://smithachallathomas.net63.net/ . Now I am trying to add a share,
I have a sidebar that I want to behave like it's frozen on the
I have a sidebar navigation that lists blog entry titles down the side of
I have an Outlook style app. So basically I have a sidebar on the
I have in a sidebar: <div id=yyy> [shortcode]</div> It outputs a title that when
I will create a webpage that has a sidebar, and the sidebar will have
Okay, on one of my sites I have a news sidebar that displays events
I have developed a windows sidebar gadget which plays videos in a flash player,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.