• Hey there, love the plugin, thanks!

    I’m wondering if it’s possible, via a shortcode, to show only pages that share a single parent page? If not with a shortcode, is it possible another way?

    Thanks again.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I am also interested in this. Has anyone figured it out?

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    This is doable in two ways:

    1: you can use the PHP method by including the_a_z_listing() in a template with a get_pages() parameter array being sure to include child_of parameter. ref: https://codex.www.ads-software.com/Function_Reference/get_pages (the presence of child_of in the parameter array switches the plugin from using WP_Query to using get_pages to support parent-child relationships.)

    2: you could use the in-built functionality for the listing to display children of the (only top-level) parent page of the listing-page. The concept is that you have a top-level page on your site, lets call it “Alice”. Alice has children Bob and Eve which are the pages you want to appear in the listing. You add alongside Bob and Eve a page with the short-code so that Alice now has children Bob, Eve, and A-Z. The plugin will crawl up to Alice and use that page as the parent in the listing so that the listing will display the three children Bob, Eve, and A-Z.

    The PHP method is easier to understand in my opinion ??

    Hi!
    Please help to correct the code.
    I need to show child pages. Placing shortcode [a-z-listing post-type=”page” alphabet=”Aa,Bb,Cc,Dd,Ee,Ff,Gg,Hh,Ii,Jj,Kk,Ll,Mm,Nn,Oo,Pp,Qq,Rr,Ss,Tt,Uu,Vv,Ww,Xx,Yy,Zz” numbers=”after”] on parent page or child giving no result – It’s showing all of pages.
    What should I add in this code [a-z-listing post-type=”page”] placed on page-type?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show Only Pages from a single Parent Page’ is closed to new replies.