• I have a ton of links and I like to show a random 5 for each category, but I can’t seem to figure out how to set the number of links displayed now that link and post categories have been blended.

    Am I just overlooking something, or is this feature gone?

Viewing 15 replies - 1 through 15 (of 45 total)
  • I am seeing the same behavior. Is there a way to reinstate this feature without downgrading WordPress?

    I’m in the same boat… Had a category called “Random Links” and was displaying a random selection of 10 links on my blog. Now I’ve had to turn off the display of links altogether because the list is 30+ links long.

    Haven’t found a workaround or plug-in yet either…

    I too was using this option, prior to upgrading to WordPress 2.1 yesterday. I was disappointed to discover today that option is gone.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Change your template to use the new wp_list_bookmarks code.

    See here:
    https://codex.www.ads-software.com/Template_Tags/wp_list_bookmarks

    You provided the same answer in two threads. I’m not sure that will work for me, nor replace the functionality I used to have. Maybe I am wrong.

    Here is the other thread:
    https://www.ads-software.com/support/topic/103800

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Yes. You are wrong.

    Yes. You are wrong.

    I am also curious if you can, please, show us how can we set
    – the number of links different for each link category
    – the display order, again, different for each link category
    FROM the admin panel in 2.1.

    Thank you!

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    You cannot set those from the admin panel. Who said you could? Setting them from the admin panel makes no sense. That’s one reason such things were removed from 2.1. They were inconsistent and weird and badly supported.

    You can specify those as parameters to the wp_list_bookmarks function, which is why I pointed them to the codex page for it above.

    It worked like that in pre-2.1 versions. I said so, because I am looking at the (2.0.7)admin panel in another window ??

    And that’s why users are confused: because a familiar setting has disappeared from their admin panel; now forcing them to edit template files instead of doing it from the admin.

    You can specify those as parameters to the wp_list_bookmarks function,

    No, you can NOT for each category a different setting. Unless you use the template tag many times…

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    I would have thought they would have been more confused with those options in 2.0.7, since they never actually worked with most themes. Any theme that used get_links or get_links_list (which was most of them), ignored the before/after/between settings, ignored the show images, ordering, ratings, limits, all that stuff. So those never worked unless you changed it to use wp_get_links instead, and even then it was a bit haphazard and weird.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    No, you can NOT for each category a different setting. Unless you use the template tag many times…

    Why would you not use it multiple times? If you’re displaying two different categories in two different ways, you would kinda *have* to use it multiple times.

    I can do it. But your question takes us back to the initial issue: average Joe User is forced to edit template files – quod erat demonstrandum.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    I wouldn’t say he’s *forced* to edit template files. He could use a sidebar widget that offers those as options. Or he could use a plugin that adds a screen to configure that stuff as complex as he wants it to be. Whatever. The fact that it’s new is the only reason those things don’t currently exist. Nobody’s made the widget, nobody’s made the plugin.

    But having a screen in the core where you can put in options that a) usually don’t work, b) are highly theme dependent and not obvious (before/after/between), and c) are inconsistent in design from the rest of the system… that made no sense.

    The bookmarks functions can do what’s being asked here. That’s as far as I was really going with it. Yes, those options are gone from the admin area. But that’s a good thing. I didn’t think it necessary to explain why when all they were asking for was how to get something to actually work the way they wanted it to work.

    Average Joe user is most of the users I know that use WP. Be that as it may, perhaps an upgrade is in order for 2.1 to at least get back to the less complex way of organizing links.

    [Edit after reading Otto’s last post which was being published as I was writing this]

    I agree with you Otto, in that editing template files will be better in the long run especially when it comes to so many different themes that were / are unable to utilize the previous links manager features (by previous, I am talking about previous to 2.1 Ella of course)

    However, I am also of the belief that non code friendly users should have the simplicity that previous versions of 2.1 had regarding being able to order links as needed from within the admin panel and if they so decide to choose a theme that doesn’t work with the old style links manager, then they’d need to get an alternate theme, widgetize, get a plug-in or alas, modify the theme’s template. While I don’t have the expertise in writing plug-ins (yet) – I am sure we will see a 2.1 plug-in that addresses ‘ease of use’ for ordering links that will hopefully not require editing template files… One of the great features of WP has been it vast array of plug-ins and so I am sure one is on it’s way.

    My contribution to those that want to customize their links —

    With my very limited knowledge of PHP, I was able to set 2.1 to have only a certain number of links in a category. Now of course I am using the K2 theme so this fix will be a bit easier than having to modify an actual template file – and K2 itself is not perfect (yet!)

    Basically I wanted 5 links to be randomized from my Blogroll – (Category 2) so within K2’s sidebar modules, I enabled 2 PHP modules, labelling the first module, Blogroll (merely as a point of reference within K2’s sidebar modules but I did not allow the name of the module to be visible since the category is defined in the code anyway.) – and in the Module’s code:

    <?php wp_list_bookmarks('category=2&before=<li>&after=</li>
    &show_images=1&show_description=0&orderby=rand&limit=5'); ?>

    Which returns only category ‘Blogroll’ and a maximum of 5 links chosen randomly.

    Next module I named ‘Links’ – and in the module’s code:
    <?php wp_list_bookmarks('category=3&before=<li>&after=</li>
    &show_images=1&show_description=0&orderby=url'); ?>

    Which returns ALL links in category ‘Links’.

    This IS a pain to have to do – but you only need to do it one time – and yes it is a very temorary fix and it does rely on wanting to use K2 but the idea can just as easily be inserted into a sidebar template (I think – since I have not tried as yet…) or perhaps another sidebar widget will give you similar results…

    If you are running 2.07 and don’t want to have to mess with this type of modification – JUST wait on 2.1 and read the support each day and see if there are any intentions for the WP developers to change things to make adding links as easy as it was in old versions.

    Personally I like 2.1 – It is faster than previous versions and aside from the links issue mentioned in this topic and a few minor bugs that I am sure will be worked out in future releases… it works well and is still as customizable as ever before if not even better.

    Vince

Viewing 15 replies - 1 through 15 (of 45 total)
  • The topic ‘2.1 – Restrict # of links shown in each category?’ is closed to new replies.