How to accomplish a child page navigation?

I’m outlining a solution for you, it uses get_children to determine if there are any, then conditionally sets up the post id $p_id for the child_of parameter, so that the list of child pages from a certain parent always can be shown, by making use of wp_list_pages(). Code: function wpse125273_child_page_nav() { global $post; $args = … Read more

Display thumbnail of child, parent and ancestor using featured thumbnails

I think you can use a different approach: write a custom sql query that get the ids of the thumbnails attachment of the children pages, and if found call wp_get_attachment_image_src on this ids to retrieve the urls: function my_get_thumbnails( $post = NULL, $which=”both” ) { // first we get the post, if no post is … Read more

How to finish this loop?

I think that the very helpful user gave you a wrong answer. Here a example which I think is better: //The ID of the parent page, for example 4. Change to the correct ID. //For example, if you are in the page loop, you can use get_the_ID() to get ID of current page $parent_id = … Read more

Firing page_publish where page is child page

The publish_page action is listed as deprecated. You can use the ‘transition_post_status’ hook to check if a page was published. function publish_page_interception( $new_status, $old_status, $post ) { if ( ($new_status != $old_status) && ($post->post_status == ‘publish’) && ($post->post_type == ‘page’) ) { if($post->post_parent > 0) { //do stuff } } } add_action( ‘transition_post_status’, ‘publish_page_interception’, 10, … Read more