• hi. a basic question, i think. i’m trying to use the wordpress as a cms for my articles, set up as “pages” (my website is baskak.pl). i’m using desk mess 1.4 theme, and i want to set up a child page to a parent page that shows in what i believe is the header of the website. in the theme, the main (parent) pages are represented by “scraps of paper” “stapled” to the desk. however, when i set up a child page, it also shows as a “scrap of paper” BELOW the parent page, therefore OBSCURED by other elements of the theme design. this is not what i intend – i don’t want it to show there, i want it to show as a link on the parent page when i open the latter. unfortunately, the child pages are NOT listed on the parent page – the parent page is empty.
    i know about the wp_list_pages() template tag, and i consulted both the help page about it and about the template tags in general. however, the help pages does not tell where to find the appropriate wp_list_pages() entries in this case (it’s not in neither header.php nor sidebar.php). to be true, i would be happy to learn about dashboard/gui method of managing this issues, if possible.
    help warmly anticipated, thanks in advance

    https://www.ads-software.com/extend/themes/desk-mess

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter baskak

    (@baskak)

    bump.

    in your page.php template, where you want the links to your child pages appear:

    <?php if (is_page(ID)) {
    wp_list_pages('child_of=ID');
    } ?>

    Where ID is your page ID number.
    If you have more pages with childs add more “else if”

    <?php if (is_page(1)) {
    wp_list_pages('child_of=1');
    } else if (is_page(2)) {
    wp_list_pages('child_of=2');
    } ?>

    Note that numbers here are mere examples, you should put your page parent ID.
    More parameters for the wp_list_pages() template tag:
    https://codex.www.ads-software.com/wp_list_pages

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘page management troubles’ is closed to new replies.