List children of second level sub page

Is this what you are after? <?php if($post->post_parent) { // if $post has parent than it is “Second level” and show its children. $children = wp_list_pages(“child_of=”.$post->post_parent.”&echo=0″); } else { // else it’s a “Top level” so display children & grand children? $children = wp_list_pages(“child_of=”.$post->ID.”&echo=0″); } if ($children) { echo “<ul>$children</ul>”; } Source: http://codex.wordpress.org/Function_Reference/wp_list_pages#List_subpages_even_if_on_a_subpage

Object gets unwanted width and height

You can try this: add_filter( ‘media_send_to_editor’, ‘remove_width_height_attribute’, 10 ); function remove_width_height_attribute( $html ) { $html = preg_replace( ‘/(width|height)=”\d*”\s/’, “”, $html ); return $html; }

Is it possible to generate a page without create in the admin?

You can create pages via techniques similar to this https://clicknathan.com/web-design/automatically-create-pages-wordpress/ . That might give you the basics of the code needed to create a page dynamically. The question is ‘when’ you will do this. You will need to tie your code into some action that corresponds to the ‘when’ you want the page to be … Read more

Pagination for sub-pages

Did you actually insert the titles/thumbnails/excerpts of the subpages manually using the post editor? If so, you can place the <!–next page–> tag in between every three subpages, and they will be split into paginated sections. (Use the HTML editor to insert the tag.) Keep in mind that many people do not like pagination, so … Read more

How to get a feed for post type ‘page’?

Feeds for post types are called with feed/?post_type=POSTTYPE. For no obvious reasons this doesn’t work for the post type page – you get the posts instead. But there is a filter to fix that: ‘pre_get_posts’. Let’s use it: add_action( ‘pre_get_posts’, ‘t5_pages_in_feed’ ); /** * Set post type to ‘page’ if it was requested. * * … Read more