Add role and edit page capabilities

The edit_pages capability only allows a user to edit his own unpublished pages. It does neither allow to edit others pages (this would require the edit_others_pages capability) nor does it allow to publish or edit published pages (capabilities: publish_pages and edit_published_pages). I’d strongly recommend having a look on this wonderful table: https://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table listing up all … Read more

the_content() Returns post content when I want page content

When you configure your blog (posts) page under Settings > Reading, that page becomes nothing more than a placeholder – in other words, you won’t be able to grab it’s title/content within index.php without a little trickery: if ( $page_id = get_option( ‘page_for_posts’ ) ) { echo get_the_title( $page_id ); // the_content() doesn’t accept a … Read more

Specify parent page template

All types of templates have filters to let you control what template is loaded. For pages there’s page_template, where you can check the queried page against an ID, or see if the ID exists in an array of a page’s ancestor IDs. function wpd_page_template_filter( $template ){ // the ID of Mango page $parent_page = 20; … Read more

How To List Sibling Pages And Include The Featured Image?

wp_list_pages only displays page title and link in list. Try following code to fetch page content and thumbnail. <ul class=”pages-list”> <?php $our_pages = get_pages($args); ?> <?php if (!empty($our_pages)): ?> <?php foreach ($our_pages as $key => $page_item): ?> <li> <a href=”https://wordpress.stackexchange.com/questions/147745/<?php echo esc_url(get_permalink($page_item->ID)); ?>”><?php echo $page_item->post_title ; ?></a> <?php echo get_the_post_thumbnail($page_item->ID,’thumbnail’); ?> </li> <?php endforeach ?> … Read more

Previewing Draft shows white page, publishing works fine?

You’ve already tried most of the things I might have suggested, but one more sanity check I’d perform in this situation is just drop an echo ‘test’; into the theme’s index.php and see if it shows up on the blank preview page. If not, then there’s definitely a syntax error someplace preventing code from executing. … 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

Multiple pages to show posts

You have not made provision for pagination, which is integral for what you want to do. You should go and have a look at how to construct a custom query and how to make use of the pagination parameters in WP_Query You will also need to go and have a look at next_posts_link and previous_posts_link … Read more