Possibility to list subpages?
-
Hello everyone.
I’d like to know if there is a possibility to list all the subpages on the parentpage. In my case I’m trying to create pages in different languages so I thought of making parentpages like “English”, French”, “German”, etc… (by the way, is there a possibility to display a flag instead of the title? That would be really awesome). And instead of linking every subpage on the specific parentpage manually I’d like to get this automatically. If I’d have my own wordpress.org-blog I’d use something like
<?php
$children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
if ($children) { ?>-
<?php echo $children; ?>
<?php } ?>
but since php is not allowed on wordpress.com is there any other possibility?
-
You are correct we cannot access or edit the php as all blogs wearing the same theme use the same template. Some themes do display links to sub-pages but most don’t. Child pages: links displayed on parent or as dropdowns If we create a custom menu using a theme that has horizontal menu then we will get drop-downs to sub-pages from parent pages. A custom menu allows you to display Categories with drop-downs to sub-categories in tabs along the horizontal navigation where normally only Pages tabs are displayed. If you wish you can also include Pages with drop-downs to sub-pages and custom links in your custom menu as well.
-
Child pages: links displayed on parent or as dropdowns The final option is to simply create the links to the child pages on the Parent pages yourself.
-
Thanks for fast reply. That’s what I feared. Well it can’t be helped then, I will try to create a useful sidebar although I would have appreciated to get that list directly displayed on the parentpage without any sidebar at all.
-
I wouldn’t make that choice. I would create a custom menu with drop-downs to the child pages from the Parent pages but suit yourself. :)
-
Actually I’m quite new to that stuff, so I’m just testing around. For the moment I tried to display only the subpages in the sidebar. Only thing is I have no clue how to get the IDs of the parentspages to exclude them. So I guess I’ll try around the custom menu now. Maybe this will be easier to figure out.
- The topic ‘Possibility to list subpages?’ is closed to new replies.