Hi
I am working on a one page site using smoothscroll, It's coming along nicely except one huge thing - I'm not sure how I am going to get the posts to display in the right areas
I am listing the pages like this:
// define how pages will display
$args = array(
'sort_order' => 'ASC',
'sort_column' => 'post_date', //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 id='<?php echo "$slug" ?>' class="section">
<h1 class="page_title"><?php echo "$title" ?></h1>
<?php echo "$content" ?>
</div>
<?php } ?>
If I query the posts and put a loop inside of the
<div id='<?php echo "$slug" ?>' class="section">
it will just post in every 'section'
Is there any kind of if post_category==page_title thing I can do to effectively query posts in this situation? I'm not terribly good at writing php, I usually can figure it out but I'm pretty stuck on this one, I'd appreciate any help.
here is a link to the development site
Thank you in advance