[SOLVED] List subpages on page?
is there a simple way to list subpages on an page?
for example in the "FOOTER: "Page" Pages"? /erik |
Try this to put it before or after the post footer. (Inside post footer would require bigger changes)
In index.php find PHP Code:
PHP Code:
|
Worked fine, thanks for the quick reply.
And if i want to exclude the list of subpages on one ore some pages? regards /erik |
Then replace
PHP Code:
with PHP Code:
I have not tried this, let me know if it doesn't work... |
works fine!
and thanks again for a nice and powerful Theme and for the quick answers. |
- following on from this, I would like to be able to list these children subcategories in the left sidebar rather than the main page (and then get rid of the full category menu). Couldn't quite seem to hit the right place with the code.
I've only just come across Atahualpa and I think it's awesome!. Thanks Flyn Heimir |
following from my post above - alternately, is it possible to get the category menu in the left sidebar to collapse down to level you are at? I'm trying to emulate the menu that IKEA have on their site at
http://www.ikea.com/gb/en/catalog/allproducts/ |
I assume you want (only) the sub categories listed when on a parent category
To do this, for the left sidebar, in header.php, line 891, find HTML Code:
<td id="left"> HTML Code:
<td id="right"> PHP Code:
PHP Code:
|
Quote:
After you implemented the code from above you could set the category menu bar to display only one level at Theme Options -> Category Menu Bar -> Depth of Category Menu Bar |
Flynn, - Thanks for replying so soon.
I put that code in but nothing at all showed up in the sidebar. I noticed the word 'category' in the code and this is a 'page' rather than a 'post' so I tried changing it to this code <?php if ( is_page() ) {with the result that it showed up OK in the sidebar, along with its widget title but included all the categories rather than just the children. My ignorance of PHP is profound so I wonder what I'm doing wrong best wishes Heimir |
You mentioned categories and subcategories that's why I posted the code for categories...
For pages: PHP Code:
|
Flynn,
yes you're right. I meant pages. Sorry. Many thanks for the reply, it works perfectly! best wishes Heimir |
Hi,
I want to exclude the subpages on my main navigation menu ( top bar ) as I just want the subpages to be displayed on my side bar but I can't find any solutions to this problem. Can anyone please advise? Thanks. |
Set "Page Menu Bar" -> "Depth of Page Menu Bar" to 1 and put one of these widgets into a sidebar
http://wordpress.org/extend/plugins/subpages-widget/ http://wordpress.org/extend/plugins/...bpages-widget/ I have used the second one. It used to work only if it was the first widget in a sidebar (= the widget on the very top). That may be the case for the other widget as well. |
how do I list subpages in the latest version? 3.4.2?:)
|
where do you want them displayed? footer? sidebar? menubar?
|
under the post in the "post footer" for example.
|
any suggestions?
|
Yoiu would want to put this code at ATO->Style & edit CENTER COLUMN->The LOOP in the area
HTML Code:
<?php bfa_post_footer('<div class="post-footer">','</div>'); ?> |
ok, thanks.
But now i get a list of all pages. I would like to have a list of just the sub-pages of the page. And i also would like to exklude the function on some pages. /erik |
well you can exclude the function from showing on some pages by using a conditional. What is the exact code you used?
|
i use the code from #4 above:
HTML Code:
<?php |
Ah this is happening because the $page->ID is blank, so by default all pages are returned.
|
ok, and how do I get the PageId?
|
Try this in version 3.4.4:
HTML Code:
<?php $not_on_these_pages = array(201); position this code in 'ATO->Style & edit CENTER COLUMN->TheLOOP' before or after the line HTML Code:
<?php bfa_post_footer('<div class="post-footer">','</div>'); ?> |
All times are GMT -6. The time now is 06:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.