[Theme: Twentyfourteen] one-page layout
-
hi, I’m trying to create a child theme of twentyfourteen with a one-page layout (like braidingfreedom.com). I’m using a different loop to retrieve all the pages but I would like to keep the content-page.php in the get_pages() loop to not break the style.css of the parent theme;
the loop I’m using now is (inside
<div id="content" class="site-content" role="main">
):<?php $args = array( 'sort_order' => 'ASC', 'sort_column' => 'menu_order', //post_title 'hierarchical' => 1, 'exclude' => '', 'child_of' => 0, 'parent' => -1, 'exclude_tree' => '', 'number' => '', 'offset' => 0, 'post_type' => 'page', 'post_status' => 'publish' ); $pages = get_pages($args); //start loop foreach ($pages as $page_data) { $content = apply_filters('the_content', $page_data->post_content); $title = $page_data->post_title; $slug = $page_data->post_name; ?> <div class='<?php echo "$slug" ?>'> <h2><?php echo "$title" ?></h2> <?php echo "$content" ?> </div> <?php } ?>
would like to use get_template_part( ‘content’, ‘page’ ); somewhere but don’t know where exactly.
Any help is very much appreciated!
thank you
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Theme: Twentyfourteen] one-page layout’ is closed to new replies.