Forums

PHP Code Widget Converts "secondary h4" to "h2" (3 posts)

  1. fenwaydirtdog
    Member
    Posted 9 months ago #

    Hello,

    I am using K2 with the PHP Code widget.

    The reason I wanted to install the widget was that I wanted to sort the page categories in the sidebar, and I also wanted to eliminate the "blogroll" section which duplicated all of the other page links I already had in the sidebar.

    I also installed the widget because I tried modifying wp_list_bookmarks in sidebar.php, and it didn't work. I changed the code to:

    <?php wp_list_bookmarks('category_orderby=slug&exclude_category=2'); ?>

    Nothing changed on the sidebar, for some weird reason.

    So I installed the PHP Code Widget. It worked fine, EXCEPT that the .secondary h4 headlines in the sidebar were somehow converted to h2. So the sidebar category headlines are extremely large. I could change the size of h2 to something that would make the sidebar look good, but it would make the h2 on the main content look intolerably small.

    Any suggestions on what to do - either with sidebar.php or the PHP Code widget? Is there a way to modify the widget so that it doesn't convert secondary h4 to h2?

    Thanks so much!

  2. Otto42
    Moderator
    Posted 9 months ago #

    The widget doesn't modify any H4's or H2's or anything of the sort. Those are defined by the sidebar creation in the theme's functions.php file.

  3. fenwaydirtdog
    Member
    Posted 8 months ago #

    I figured out how to change the sidebar titles to H4 from H2 (while continuing to suppress the Blogroll category and organizing them by slug) through wp_list_bookmarks:

    <?php wp_list_bookmarks('title_before=<h4>&title_after=</h4>&category_orderby=slug&exclude_category=2'); ?>

    Peace.

Reply

You must log in to post.

About this Topic