Make sticky post with FacetWP

Ok, I figured it out myself. So maybe I can help someone out with the same question. I made a custom field TRUE / FALSE called “featured”. In facet WP I created this query: <?php return array( ‘post_type’ => ‘custom_post_type’, ‘post_status’ => ‘publish’, ‘meta_query’ => array( ‘is_featured’ => array( ‘key’ => ‘featured’, ‘compare’ => ‘EXISTS’ … Read more

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