For some reason my link descriptions disappeared after I upgraded. Anyone know a solution? I'm using the php get_links_list tag. It seems the link category options where you can turn the descriptions on and off is no longer there.
For some reason my link descriptions disappeared after I upgraded. Anyone know a solution? I'm using the php get_links_list tag. It seems the link category options where you can turn the descriptions on and off is no longer there.
I'm getting the same problem i cannot see my links
Change to using the wp_list_bookmarks() function instead of get_links_list().
And how do you change that?
Nice Otto, thanks. I must have missed that.
pierrefitch: Edit your theme and change the get_links_list function to use the newer function. It will require a bit of minor effort to translate from the old way to the new way, but the effort is very minor.
Here's what I have:
<!-- Begin - Links from the 'Links Manager'-->
<?php
$link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
foreach ($link_cats as $link_cat) {
if (get_links($link_cat->cat_id, '', '', '', FALSE, '', FALSE, FALSE, -1, FALSE, FALSE)) {
?>
<div class="left-widget-title"
id="linkcat-<?php echo $link_cat->cat_id; ?>">
<?php echo $link_cat->cat_name; ?>
</div>
<div class="left-widget">
<ul>
<?php wp_get_links($link_cat->cat_id); ?>
</ul>
</div>
<?php
}
}
?>
Which part do I change the function from/to?
BUMP
I'm having the same issue. Just now upgraded from 2.05 to 2.1. Everything seems to be working OK, except none of my links show up on the sidebar. The link topic HEADINGS all show up OK, and all the links are still there in the SITE ADMIN area.
Another bump in the wall.
Might I suggest actually going and reading the documentation?
OK, maybe I should be a little more clear. Can anyone indicate how to implement the new function with a demonstration of actual code changes from the old?
I would like the same demonstration. I'm a designer and I can easily edit the PHP code, but I'm not very comfortable with it, so clearer instructions would be greatly appreciated.
I'm glad its not just me bamboozled by this...
An alternative would be: can anyone name a WordPress theme that does this properly under WP2.1 so that we can have a look at the code?
@JohnA
Not too sure what you mean by "properly", but the default theme uses wp_list_bookmarks in sidebar.php.
What theme are you using?
I've just upgraded from 2.0.5 to 2.1 and am using the default theme. wp_list_bookmarks is in sidebar.php, but link descriptions still do not show. There doesn't seem to be any way to sort the links anymore either.
Does anyone know how to fix this?
Oops, missed the point about the description before!
I used this line in the default theme's sidebar.php
<?php wp_list_bookmarks('show_description=1'); ?>
Thanks, Michael. That worked perfectly to display the descriptions.
Thanks Michael, that is an enormous help.
I thought I'd post what I did for others to see where the modification is supposed to go:
In sidebar.php of your chosen theme find:
<!-- Begin - Links from the 'Links Manager'-->
<?php
$link_cats = $wpdb->get_results('SELECT cat_id, cat_name FROM ' . $wpdb->categories . ' WHERE link_count > 0');
foreach ($link_cats as $link_cat) {
?>
<div class="left-widget-title"
id="linkcat-<?php echo $link_cat->cat_id; ?>">
<?php echo $link_cat->cat_name; ?>
</div>
<div class="left-widget">
<ul>
/* Add Michael's line here */
<?php wp_list_bookmarks('show_description=1'); ?>
/* Comment out the original wp_get_links which no longer works
/* <?php wp_get_links($link_cat->cat_id); ?> */
</ul>
</div>
and save the resultant.
Next put the links widget where you want it, and voila!
In 2.2.1 I modified widgets.php in "includes" to this:
wp_list_bookmarks(array(
'title_before' => $before_title, 'title_after' => $after_title,
'category_before' => $before_widget, 'category_after' => $after_widget,
'show_images' => true, 'class' => 'linkcat widget',
'show_description' => $after_title
));
The "Show Description" line is what I added. Worked for me.
This topic has been closed to new replies.