peer
Forum Replies Created
-
Forum: Plugins
In reply to: Dynamic sub-category links, is this possible?Yep, this is possible and almost what I want.
Use wp_list_pages(‘title_li=&depth=1’). Put it in the header.php and style it with CSS. Now you have your horizontal bar.
The sub-categories is another story. (I want almost the same as you but instead of a vertical sidebar I like it horizontal beneath the main horizontal menu.) To do your trick, use wp_list_pages(‘title_li=’ . the_title() . ‘&child_of=<page ID>’) in your sidebar.php (it’s there already if you haven’t changed anything yet).
A few remarks:
1. Look up the function the_title() because it has several useful options you might like to use.
2. You have to change <page ID> in the page ID you would like to show the children (sub-categories) of. This can be just a hardcoded number, but that’s probably not what you want. What you need – to make it dynamic – is the ID of the top page (the one without a parent) of your current page ($page_id or $post->post_parent won’t do the trick). To be honest … I’ve been looking through all the functions but have no clue whatsoever how to find this ID. I really need it too! So anybody out there who can help us out here ??Forum: Fixing WordPress
In reply to: Minor bug in function _page_level_out ()Thanks Womby, this works great!
BTW I’ve been looking through all functions and serched the forum but seem not to be able to find what I’m looking for. I need a function that tells me the ID of the top page (the one without a parent) of the current page.
Why? Because I need this in order to present me a 2nd bar with all the first level children (wp_list_pages () with the option child_of) and to keep it there when I click the link. Any suggestions?
Forum: Fixing WordPress
In reply to: Minor bug in function _page_level_out ()I want all of my top pages to look like a horizontal menu bar at the top of my screen. A bit like the menu at WordPress. If I do that with wp_list_pages(‘title_li=&depth=1’) I get an ugly space below my bar due to unneccessary ULs. With this modification they’re gone like they should.