markflo
Member
Posted 8 years ago #
Running WordPress 1.5.
I made a link category named "Links", then in my links section there was an empty section named "Links". So I deleted the "Links" category (no entries in it yet), but the empty "Links" thing is still there. Then I tried RENAMING an existing category to "Links", and it made a second empty "Links" section on my weblog.
ARGH!!!
Anybody have any idea what happened? I want to get it cleaned up.
Here's my WordPress weblog page: http://markflorida.com/weblog/ The problem I'm describing is on the right-hand side (you'll see three "Links" sections, with only one of them containing actual links).
Look in your sidebar.php and see that there are double entries for Links:
<h3>Links</h3>
<ul>
</ul>
<h3>Links</h3>
<ul>
Delete one set.
markflo
Member
Posted 8 years ago #
Nope -- only one <h3>Links</h3> tag in the template -- if they're being generated on the displayed page, then it sounds like a bug somewhere. If there's a problem with a links category being named "Links" then it should not be allowed in the first place...
markflo
Member
Posted 8 years ago #
Am I going to have to dig into the database to fix this?
markflo
Member
Posted 8 years ago #
If anybody has any ideas about this -- PLEASE LET ME KNOW!
Also, here is the block of code in question:
<!-- start links -->
<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
<?php
$link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
foreach ($link_cats as $link_cat) {
?>
<h3>Links</h3>
<ul>
<?php wp_get_links($link_cat->cat_id); ?>
</ul>
<?php } ?>
<!-- end links -->