Changing featured content from posts to pages
-
Hi all,
Loving this theme and am in the midst of customising to suit my needs.
I’d like to have my frontpage display featured pages instead of featured posts.
To this end I’ve done the following in my twentyfourteen child theme:
1. Defined Featured_Content in functions.php so that I can redirect it to my featured-content.php in the child theme
define('Featured_Content', true); require '/inc/featured-content.php';
2. Modified the function get_featured_post_ids() to return pages that match a meta_key:
// Query for featured pages. $featured = get_pages( array( 'sort_column' => 'ID', 'number' => $settings['quantity'], 'meta_key' => 'featured-page', 'meta_value' => '1', 'post_type' => 'page') );
3. Verified my featured pages are being found
print_r($featured);
After this point I seem to be getting stuck, it looks like content-featured-post.php is the template used, however I dont seem to be able to get any debug output or the grid output I’d love to see by modifying this file.
Can anyone help to point me in the right direction?
Thanks!
Craig
- The topic ‘Changing featured content from posts to pages’ is closed to new replies.