loading a php file to a specific page id

Use the template hierarchy, you can name files in your theme so that they load in specific circumstances. E.g. the template category-unicorns.php will be used instead when on the category with the slug unicorns

Disable pagination in posts and pages

function wpse_disable_pagination( $query ) { if( $query->is_single() && $query->is_page() ) { $query->set( ‘nopaging’ , true ); } } add_action( ‘pre_get_posts’, ‘wpse_disable_pagination’ ); NOTE: nopaging (boolean) – show all posts or use pagination. Default value is ‘false’, use paging.

How to tell if a page has subpages for Custom Post Types

This code will return an array with IDs of all pages having sub pages. Hope you were looking for it 🙂 $args = array( ‘post_type’ => ‘page’, ‘post_status’ => ‘publish’ ); $parentPages = array(); // an empty array to store pages with childs $pages = get_pages($args); // Looping through all pages and then we’ll check … Read more

How can I make a category function as a page?

With Beaver Builder, I’d just add another plugin called “Display Posts Shortcode” that will insert your category wherever you’d like. Maybe the following will help: Download the plugin “Display Posts Shortcode” here: https://wordpress.org/plugins/display-posts-shortcode/ Insert the following text on the page where you want display the posts in your category: [display-posts category=”categoryname“] You can choose to … Read more