• Resolved blainn13

    (@blainn13)


    I don’t know how to get into the guts of the widgets or how they work (thus far, they’re just Fun Magic to me), but the Meta widget is producing this code in this document:

    <h3 class="widget">Meta</h2>
    <ul>
    <li><li><a href="https://blainn.com/abuse-blog/wp-admin/">Site Admin</a></li></li>
    <li><a href="https://blainn.com/abuse-blog/wp-login.php?action=logout&_wpnonce=47d91ed7d4">Log out</a></li>
    <li></li>
    
    </ul>

    Note the h3 tag being paired with a /h2 and the double li at the beginning of the list and the empty li /li pair at the end.

    Also, when I look at the six widget areas, I have “Links” showing up in Head One, and “Pages” showing up in Sidebar. I don’t have “Meta” listed anywhere. Nor do I have “Categories,” but there they all are in the sidebar.

    Thanks in advance. I’m definitely on the beginner side of this dynamic html stuff, and on WP.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You’d need to check how the widgets are being set up in register_sidebar() in your theme’s functions.php file.

    Thread Starter blainn13

    (@blainn13)

    Esmi — Thanks for keeping on helping me.

    I looked, and I didn’t find that part useful. But I did look in the sidebar.php and found the code that was causing the problem. Several places in that file had <h3> paired with </h2>, and I fixed that. I’m thinking that the conditionals that lead to that particular piece aren’t working properly, and I’m thinking some serious tweaking is going to be necessary to make this work.

    Here’s the part that produced the mark-up above:

    <?php if ($bz_sidebar_meta == "yes") {?>
    <h3 class="widget">Meta</h3>
    <ul>
    <li><?php wp_register(); ?></li>
    <li><?php wp_loginout(); ?></li>
    <li><?php wp_meta(); ?></li>
    </ul>
    <?php }?>

    Except that the output doesn’t closely match this, so I’m still a little confused.

    I think that is the right piece of code. When you’re logged in, you’ll see “Site Admin” instead of “Register”. The wp_meta() is an older, relatively undocumented, hook that can be used to display a list of available themes if you;re using a theme switcher.

    https://core.trac.www.ads-software.com/ticket/1458

    If you have no need of it, I’d simply delete the <li><?php wp_meta(); ?></li> line.

    Thread Starter blainn13

    (@blainn13)

    Thanks again. I removed that line, and I removed the opening

    • from the wp_register() line, guessing that, somehow, the function is prepending one into its value. And now it’s working, although I do see this as a slightly kludgey solution.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sidebar/Meta Widget making bad code in Wall42 theme’ is closed to new replies.