Roy
(@gangleri)
I’m sure you read the Codex for this sort of questions?
It’s very helpfull sometimes 🙂
Hi G
I read it, but am having difficulty trying to figure out exactly where to put the ‘exclude’.
Told you I was a newbie.
Can any kind soul just give me some code on this?
H
Roy
(@gangleri)
That’s the code you can use in your sidebar.php (it says: “list, except these few”), but my guess is that you use widgets? In that case it might be easier to look for a plugin to do the trick for you.
Hi G
Sorry to contradict, but, no, I don’t use widgets.
I’ve got the whole “list except these few” thing but, as I’m not a PHP-happy coder, I don’t know how to incorporate that request into my existing template without destroying the existing functionality.
Again, at the risk of seeming a little pushy, I’m just hoping for someone who’s PHP-savvy to just show me the adjusted code – amended from the block I supplied – to incorporate back into my template.
Again, all help appreciated.
H
Roy
(@gangleri)
I’m not either, but you can only learn by trying. My first guess would be:
<?php wp_list_pages('exclude=17,38 sort_column=menu_order&depth=1&title_li='); ?>
No PHP required. Just excellent reading and Copy/Paste skills. So go back to the Codex article and read it again. And again…
OK chums
I get the whole ‘learn by digging’ thing too, but, considering this is my day off I guess maybe I was being somewhat lazy… 🙂
Alright, as a non-PHP savvy guy let me try this one on you:
As I’m using a hacked-about version of an Andreas Wiklund template, I have another string of PHP in my page template (as opposed to theheader template code I mentioned at the start of this post).
The code runs:
<?php list_subpages_andreas01(); ?> <?php // This generates the subpage menu. If you don't want to use it, delete this line. ?>
Now, Was I on the right track with the original code block, or is this the block that requires adjustment?
Please note: (if it makes any difference) that it is my right-hand sub-page menu, as opposed to my left-hand main menu that I’m trying to exclude certain pages from
H