List child pages by slug not ID?

Why don”t you use get_page_by_title() to get the page object, and then pass its ID as the child_of parameter? If you would rather use the actual slug, then get_page_by_path( $slug ) should do the trick. So: if ( $page = get_page_by_path( ‘your-page-slug’ ) ){ wp_list_pages( ‘orderby=name&depth=1&order=DESC&show_count=0&child_of=” .$page->ID . “&title_li=’ ); }

List all-childpages on parent-page AND list child-pages on childpage itself but not the current one?

function show_subpages() { global $post; $subpages = wp_list_pages( array( ‘echo’ =>0, ‘title_li’ =>”, ‘depth’ =>2, ‘link_before’ => ‘&mdash; ‘, ‘child_of’ => ( $post->post_parent == 0 ? $post->ID : $post->post_parent), ‘exclude’ => ( $post->post_parent == 0 ? ” : $post->ID) )); if ( !empty($subpages) ) { echo ‘<ul id=”subpages” class=”wrapper”>’; echo $subpages; echo ‘</ul>’; } } … Read more

Injecting a custom sql query into a page/theme

The hooks you are looking for can be found in the WordPress Codex WP_Query – Filters: Filters posts_distinct – Alters SQL ‘DISTINCTROW’ clause to the query that returns the post array. posts_groupby – Alters SQL ‘GROUP BY’ clause of the query that returns the post array. posts_join – Alters SQL ‘JOIN’ clause of the query … Read more

Schedule Page to Menu [duplicate]

I believe that this plugin will do what you want. Jamocreations Auto Submenu https://wordpress.org/plugins/auto-submenu/ Here is also a link to the author’s site, http://jamocreations.com/en/artikelen/auto-submenu , where he discusses why he built the plugin and also two other plugins that also work similarly. The advantage of the Jamocreations Auto Submenu plugin though is that if later … Read more

Best way to give site sub-page it’s own domain?

You are on the right track. Point your add-on domains to WordPress root Create WordPress landing pages Point to landing page using add-on domain Rel=canonical will prevent duplicate indexing penalty All landing page links will automatically point to canonical domain Naturally you will do all your editing from the canonical domain If you run into … Read more