• I currently have a lot of various links and instead of having a huge list on the sidebar, how do I display only the link categories? Do i use WP Links Manager Tags as described in the wiki ?
    Also, does a Link category have it’s own page?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Do i use WP Links Manager Tags as described in the wiki?

    Yes.

    Does a Link category have it’s own page?

    Sort of. It lists all the posts in that category, descending in chronological order.

    Where is WP Links Manager described in Wiki? Is it this page that you are talking about?

    Thread Starter pMc

    (@pmc)

    No this page:
    http://wiki.wordpress.org/TemplateTags#Linksx20.Manager
    Also, I don’t mean Links to posts. I am talking about the Links to other websites. I have groups for all my URI links, but on my site every single site link is listed, i want only the categories to be displayed.
    So do I use this link above that i posted ??

    If you want only the categories to be displayed, wouldn’t you want to have the titles link to something?
    What would you like them to link to.
    None of the template tags display only the link categories, since the links are what the list is all about 🙂 You will have to look at the functions that list the links, and try to emulate them – leaving out the code that lists the links, and preserving only the part that displays the link categories.

    If you want the link cat titles to display, and them the cats within them when a user clicks a title, have a look at my page (down in the menu – Sites / Cats / Archives)
    If that code is what you want, I’ll sort it out. It’s very easy to use.

    Hi Podz

    I like the drop down style – if you see this, how did you do that.
    Thanks – Steve

    I see this 🙂

    Hang on – I’ll grab the code 🙂

    Okay..if the formatting throws this out, I’ll post this as a text file.

    1:
    In <head> I have this line:
    <script type="text/javascript" src="http://www.tamba2.org.uk/T2/hacks/kadabra.js">
    </script>

    2:
    In the directory /T2/hacks, I have the following file. Highlight just this code and save – using Notepad – as “kadabra.js”

    function kadabra(zap) {
    if (document.getElementById) {
    var abra = document.getElementById(zap).style;
    if (abra.display == “block”) {
    abra.display = “none”;
    } else {
    abra.display = “block”
    }
    return false
    } else {
    return true
    }
    }

    That’s the js code sorted…….now to put the function into index.php (or sidebar.php)

    3:
    The whole of the bottom of my sidebar code looks like this:

    <li id="linkage"><a href="#" onclick="return kadabra('m1');">‡ Site Linkage</a>
    <ul id="m1">
    <?php wp_get_links(1); ?>
    </ul>
    </li>

    <li id="categories"><a href="#" onclick="return kadabra('m2');">‡ Categories</a>
    <ul id="m2">
    <?php wp_list_cats(); ?>
    </ul>
    </li>

    <li id="archives"><a href="#" onclick="return kadabra('m3');">‡ Archives</a>
    <ul id="m3">
    <?php wp_get_archives('type=monthly'); ?>
    </ul>
    </li>

    <li id="search">
    <a href="#" onclick="return kadabra('m4');">‡ Search</a>
    <ul id="m4">
    <li>
    <form id="searchform" method="get" action="<?php echo $PHP_SELF; ?>">
    <div>
    <label for="s"></label>
    <input type="text" name="s" id="s" size="15" />
    <input type="submit" name="submit" value="»" />
    </div>
    </form>
    </li>
    </ul>
    </li>

    If you stare at that a lot, and what you’ve got, it should figure where things go.

    4:
    CSS, we need CSS.
    Put this into your stylesheet:
    #m1, #m2, #m3, #m4 {
    display: none;
    }

    Now, when all that is correctly put together, you should get the popup/down effect that I have.

    This is NOT my code. This code is from the utterly indispensable CSS Cookbook by Christopher Schmitt (O’Reilly Publishing).

    This text is also uploaded to http://www.tamba2.org.uk/wordpress/kadabra.txt

    Thanks – I’ll try it in a mo

    Cheers – Steve

    It works a treat – thanks.

    I had managed ot find the .js file and the code, but was missing the css that made it work!

    Thanks, especially for the quick response – Steve

    Excellent – glad it worked 🙂

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Links Manager Tags?’ is closed to new replies.