WordPress.org

Support

Support » How-To and Troubleshooting » Where in WP code to edit “Link Category” ??

Where in WP code to edit “Link Category” ??

  • I need to go into the WP code and edit the place where it displays the “Link Category” on the sidebar – Does anyone know which file and where in that file I should do this?

    Thanks!!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Mark (podz)

    @podz

    Support Maven

    It’s not in the theme file ?

    No, in the sidebar.php file in the theme, it just makes a call to some category-related function. I’m looking for the specific place in that function that displays the link category.

    Oh, and I’m using WP 2.0.1

    Mark (podz)

    @podz

    Support Maven

    I’d look first in links.php and link-categories.php

    I’ve hunted around link-categories.php, can’t find anything. 🙁

    Mark (podz)

    @podz

    Support Maven

    This may sound daft, but can you do a screenshot or give us a link to precisely what you mean ? I think we are talking about different things.

    Look at the sidebar on the very right…
    http://www.finlandforthought.net

    Look at the link categories (if you’re using firefox) or the first link in each category (if you’re using IE). Something is screwed up there, it’s probably in my CSS, but when I was using 1.5.2 I was able to edit something to fix this. When I upgraded to 2.0.2 I lost that.

    Thanks for your help podz!!!!!!

    Mark (podz)

    @podz

    Support Maven

    Okay….
    Line 547 in links.php is this:
    // Display the category name
    echo ' <li id="linkcat-' . $cat['link_category'] . '"><h2>' . $cat['cat_name'] . "</h2>nt<ul>n";

    and that’s where the h2 is being added. But after that h2 is a newline, then a tab… so why yours is doing that….

    I’ll keep looking.

    I always wondered why that h2 for the linkcat was generated from core . . . kinda dumb.

    Mark (podz)

    @podz

    Support Maven

    From a year ago:
    http://wordpress.org/support/topic/24245?replies=8
    agreed. Should be an owner’s choice.

    psychwar:
    Do you definitely have
    $cat['cat_name'] . "</h2>/n/t<ul>n";
    in your links.php as above ?

    Edit: see the /n/t ? those slashes should be the other way round.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Where in WP code to edit “Link Category” ??’ is closed to new replies.