WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Merging of (blogroll) Links and Categories in 2.1 (25 posts)

  1. Lace
    Member
    Posted 7 years ago #

    Ok, so I was having probs with the blogroll/categories issue. (Click my member link to see my trouble posts.) I did a little more searching and found this article. I really wish I had seen this first!

    It answered one of my major questions and gave other nice info about 2.1 as well. Here is a tidbit that I found useful. Be sure to read the entire article at http://www.technosailor.com/10-things-you-should-know-about-wordpress-21/

    "Merging of Links and Categories - ... In previous versions of WordPress, links and categories were handled as two separate entities. Links were seen as a thing used solely to power a blogroll and Categories were seen as a way to solely compartmentalize posts. In WordPress 2.1 ... the Categories table is now prepopulated with a Blogroll category and all links are assigned, by default, to the blogroll category."

    Thanks Aaron!!!

  2. ealm
    Member
    Posted 7 years ago #

    I understand the merging.

    Now, how do I sort my link categories in 2.1? (they are messed up after upgrading)

  3. Lace
    Member
    Posted 7 years ago #

    ealm,

    I think a lot of us have the same question! I wish we had just stayed with the old way of doing this, but that is just my personal opinion.

    L

  4. Lace
    Member
    Posted 7 years ago #

    I fixed my site with the info found in this article. The article tells you how to exclude categories and other things. After I fixed the category prob, the My Category Order plugin I had works just fine!

    Here is the info link I used to change the code in my sidebar: http://codex.wordpress.org/Template_Tags/wp_list_categories (scroll to see "Categories with Excludes")

    Lace

    You can see the changes at http://memorylaneproducts.com

  5. ealm
    Member
    Posted 7 years ago #

    Thanx Lace!

    I'm afraid though, that I'm not a technical enough person to understand this. The best I can do with the "Categories with Excludes" instructions, is to list to post categories in different ways. I don't know how to get it to handle to link categories.

  6. Lace
    Member
    Posted 7 years ago #

    aaaaaaw ealm. I found myself in a similar position a few months ago and decided I'd just have to jump in. It was sort of like learning to swim as a kid. Once I got used to the water, you can't keep me out of it. ;)

    In my case (many others' too) it's just a matter of finding the section you need to change in the sidebar php and then copy and paste the new "phrase" or code. This part really isn't as hard as I thought when I first began, several months ago.

    Oh, I forgot to say that I got my "blogroll" links to show up by replacing my old link code (where the blogroll stuff is after 2.1) with <?php wp_list_bookmarks(); ?>

    So far, making these changes has made my site behave as before. I have no idea if it's a good programming move but hey...it works for me. ;)

    Good luck.

    L

  7. Xander
    Member
    Posted 7 years ago #

    Does anyone know what the purpose of merging blog/link categories is?

  8. JRepin
    Member
    Posted 7 years ago #

    Hi,

    I just upgraded to 2.1 and have problems with this merge. Now Blogroll and other categories show link with description added after them. How can I make it so that it looks like in old version, so only the link and the description in title tooltip for the link.

    If I remember correctly the old version of WP also had an option if description is shown or not. But I can't find this option for categories anymore.

    Thanks in advance for help!

  9. sofsoldier
    Member
    Posted 7 years ago #

    Now I understand why this is happening with the Blogrole, and I understand that I must change the wp_list_bookmarks() functions within the theme files, but how does this fix adding new links?

    As it stands, I cannot add a new link without getting an error:

    SELECT category_id FROM wp_link2cat WHERE link_id = 3 ORDER BY category_id

    and I cannot assign a category to the link.

    When I delete the link I just created, I get this error:

    WordPress database error: [Got error 1 from storage engine]
    SELECT category_id FROM wp_link2cat WHERE link_id = 4 ORDER BY category_id

    WordPress database error: [Got error 1 from storage engine]
    DELETE FROM wp_link2cat WHERE link_id = '4'

    The article provided does not give any information about this. Anyone have any ideas?

    I can add a new post to the blog, and I notice that within the categories are the added categories of my links, with the title above the added categories as "links." This makes sense due to the merge. I can even add the new categories to my post.

    What is also interesting is that when I try to delete a category under Manage > Categories, I get this error:

    WordPress database error: [Got error 1 from storage engine]
    SELECT link_id FROM wp_link2cat WHERE category_id='22'

    So it seems the Blogrole and post categories are affected by this merging. The question is how do we fix it?

  10. songfta
    Member
    Posted 7 years ago #

    This merging is really problematic for me because I had both a link/blogroll category and a post category that shared the same name. Now that the two are merged, I can't really separate the two.

    Does anybody here know how to separate the two in a way that won't blow away the posts? Will I need to blow away my blogroll and rebuild?

    This move just didn't make any sense. Unless post categories are replaced completely with tags, there's no rhyme or reason for this merging.

    Or simply make it optional - that would make a lot of WP site owners much, much happier.

  11. holyroller
    Member
    Posted 7 years ago #

    My problem is that I use Blogrolling.com for my blogrolls. I used the Links section of WP for all the multiple links I had. I used the post categories to add searching and categorizing of the posts.

    This change in WP assumes that everyone blogrolls (links to other blogs). Those of us who used WP more for CMS are SOL.

    To me, post categories and link categories were two very separate entities.

  12. srburk
    Member
    Posted 7 years ago #

    - deleted post - correction follows -

  13. srburk
    Member
    Posted 7 years ago #

    I'm sorry. I just don't understand. I want my blogroll sorted by categories. Everybody refers me back to help such as http://codex.wordpress.org/Template_Tags/wp_list_categories but I just don't understand it.

    Right now, my blogroll is listed as:
    <?php get_links(-1, '<li>', '</li>', '', FALSE, 'name', FALSE, FALSE, -1, FALSE); ?>

    Can someone please tell me how to edit this line? I'm sorry, I'm just a dork and can't understand all of the code. I'm a copy/paste kindof guy.

  14. john24
    Member
    Posted 7 years ago #

    So, is there anyone that can fix this or is it just a wordpress 2.1 bug and we have to wait for 2.11?

  15. songfta
    Member
    Posted 7 years ago #

    I think this this merging of blogroll and post cats was one of those things where the developers said "we know better than all of you" without actually explaining their logic or rationale, and without bringing it up with the user community-at-large to discuss.

    So the developers - for whom these issues usually aren't as big a deal because they know the workarounds ahead of time - forge ahead without asking "how will this affect the users who may think differently?" It's short-sighted and aggravating, to say the least.

    I've had to completely blow away my blogroll and most post categories just to get things back in order, and it's still a mess. Yes there's not a peep from the WordPress developer community, other than "well shucks, that's a pickle" (or something to that effect). That's the kind of non-answer I expect from Micro$oft, not from the usually-user-centric WP dev folk.

    Oh well. I'm gonna chalk this up as a blip (but a costly one in terms of work cycles wasted to adapt to a needless "enhancement" of WordPress), and hope that 2.1.1 or 2.2 gets things right.

  16. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    The new links functionality is not that difficult, I don't understand what all the fuss is about.

    Basically, you just don't use get_links or wp_get_links anymore. Use wp_list_bookmarks instead.

    That's it. From a theme editing and/or development standpoint, that's all you do. There's virtually no difference to the end user other than that.

    Yes, there are improvements to be made, but it's not all the complex change that you guys are making it out to be. The change is minor, the implications large, and the end-user changes minimal. It's just not a big deal, really.

    @sofsoldier: Your error is not specifically because of links. You have a database problem. Try repairing it in myPhpAdmin or have your host check to make sure that the database server isn't having issues with full /tmp space.

  17. Xander
    Member
    Posted 7 years ago #

    I am trying to figure out what benefits this change might confer... I guess I could put links into post categories and then have a custom set of links for different category pages if I wanted? Yeah, I guess that would be easy to do...

  18. TechZ
    Member
    Posted 7 years ago #

    I had to re-sort, categorize my Blogroll links as well, but I was wondering, since the mergine of both categories, how do we now limit the links in our Blogroll to a specific number, as was possible in pre WP 2.1. Another option was to randomize it, therefore if you had 30 links, you could set it to show 10 at a time, randomized. The codex doesn't seem to have been updated to reflect the latest changes of WP 2.1 in this regard

  19. andyhoyland
    Member
    Posted 7 years ago #

    So - how do I go about recreating my 'sectioned' (not in the crazy way) links list in a similar way to before?!

    When I put:

    <?php get_links(2, '', '
    ', ' - ', FALSE, 'name', TRUE); ?>

    I don't get any links...

    So at the moment I can only have 1 long list of my categories.

  20. andyhoyland
    Member
    Posted 7 years ago #

    So - how do I go about recreating my 'sectioned' (not in the crazy way) links list in a similar way to before?!

    When I put:

    <?php get_links(2, '', '<br />', ' - ', FALSE, 'name', TRUE); ?>

    I don't get any links...

    So at the moment I can only have 1 long list of my categories.

  21. pizzaman
    Member
    Posted 7 years ago #

    I don't see why get_links can't still be used. It's not deprecated in 2.1

    If you look in admin->manage->categories, you'll find that WP added some new category IDs. I just replaced the "old" cat ID with the new one and get_links works fine for me.

  22. mandrill
    Member
    Posted 7 years ago #


  23. mandrill
    Member
    Posted 7 years ago #

    So what do I replace the following code with to get a list of the links I have separated by their category. I don't see an answer to that question anywhere above.
    '<?php $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
    foreach ($link_cats as $link_cat) {
    ?>
    <li id="linkcat-<?php echo $link_cat->cat_id; ?>"><h2><?php echo $link_cat->cat_name; ?></h2>

      <?php get_links($link_cat->cat_id, '

    • ', '
    • ', '', TRUE, 'id', FALSE, FALSE); ?>

    '
    Currently I'm getting a MySQL syntax error in the query:
    "SELECT cat_id, cat_name FROM $wpdb->linkcategories"`

  24. andyhoyland
    Member
    Posted 7 years ago #

    Thanks Pizzaman - again, I feel silly for not looking harder before posting.

    Mandrill - for me it was just a case of my category ids for my links changing. I found the new ones by following Pizzaman's advice. I don't know if that would work for you as I'm not very clever.

    Sorry I can't help.
    A.

  25. ingels
    Member
    Posted 7 years ago #

    The upgrade to 2.1 is starting to take me down, why oh why should they merge the blog posting categories with the links ?

    Why is it forced upon the WP users and not an option one could choose instead ?

    For now, I think that 2.1 is a bad upgrade.

Topic Closed

This topic has been closed to new replies.

About this Topic