Support » Fixing WordPress » Using pages in wordpress
10 years, 11 months ago
im not actually sure if this belongs here so please move to the relevent place if it doesnt.
i’ve recently converted my whole site to wordpress as opposed to just having an iframe with word press as a news page.
i am currently in the process of adding all the pages into word press from my original html files.
i have built my one theme file today, but one thing i have found is, that in the sidebar area the pages list as,
followed by sub page then other sub pages.
is there a way to force it to only show the main page.
or how would i implement a script that allowed drop down menus containing the sub menus. rather than them being shown.
I’m really sorry if this doesn’t make sense please ask for more details/
you can see what i mean here
help is very much appreciated, I’m a bit stuck for what to do really
Try the code:
<?php wp_list_pages('title_li=&depth=1'); ?>
in your sidebar and see if that does what you want it to do. Setting the depth to “1” Restricts the list to only top-level parent pages. You may want to also check out the codex entry on pages to learn about all of the parameters that you can use.
thanks thats been really helpfull problem sorted for now