Specific category posts to static page
-
Im using tiny-framework_2.1.1_2015-06-08 with a child theme. I am trying to set up a static page (navigation menu page name Media – ID 4603) to show all posts for a category (media) with the full-width.php page template.
I copied full-width.php from the parent theme and copied it into the child theme as full-width-media.php.
I tried it in the root folder of the child theme, made folders called template-parts/ and page-templates/ in the child them folder. For each of those folders I am not seeing it in the Page Attributes to choose on the Media page quick edit.
I have not gotten this far to test yet. In my page full-width-media.php
I removed
// Include the page content template. get_template_part( 'template-parts/content', 'page' ); // If comments are open or we have at least one comment, load up the comment template. if ( comments_open() || get_comments_number() ) : comments_template( '', true ); endif;
and have added this:
if(is_category('media')){ get_template_part('content','media'); }else{ get_template_part('content','full-width-media.php'); }
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Specific category posts to static page’ is closed to new replies.