• Am I missing something here? I have created an “Admin” links category that I want to display only when the site admin is logged in. That part I have working fine.

    However, the category shows up in the links section of my sidebar when ‘get_links_list();’ is called. I obviously don’t want it displayed there. It would be nice if there were a parameter or a function that said: “Display all link categories except these( 1, 5 )”

    Is there any way this can be done? Other than writing a plug-in/hack?

Viewing 5 replies - 1 through 5 (of 5 total)
  • I would list each set of links by calling them individually, and wrap what you want hidden in the code you have working – if that makes sense.

    Thread Starter vesperdem

    (@vesperdem)

    I was thinking it might be nice to write a little php code to loop through all the available categories, displaying the name, then the links (like the current get_links_list() does now), but skipping any categories I don’t want to display.

    I’ll have to take a look at the get_links_list() function and copy it to my index.php file making a few mods. (Asuming I can even do that, not being up on php as much as I would like.)

    #admin {
    display: none;
    }
    should make the admin category not show up. Not sure if you can make it condtional for just the logged in user.

    Thread Starter vesperdem

    (@vesperdem)

    Thanks, I’ll try that. An interesting way around it. 🙂

    I’ve got the admin category showing up using wp_get_links(n) inside a php if statement. I just needed a way of not showing the other.

    yeah i’m trying to do the same thing. using something like the wp_get_links(n) to NOT display a certain category. other than displaying the categories i do want individually. anyone have any way out?

    its not too big a hassel to end the individual categories i suppose…but anything to shorten the code 🙂

    Ronny.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Display all link categories except…’ is closed to new replies.