Authors, Custom Fields, Dates, Oh my!
-
What I am trying to achieve..
Query a list that can have pagination after every 25 posts. This list needs to only pull data from a custom post type called “customOne”. This list needs to only pull data from posts created by a specific author ID that I am able to populate by a variable. This list needs to pull a sum of data from an advanced custom field titled “quantity” from each weeks worth of posts.
So it needs to display be something like..
Query?: Post Type = customOne, each post is of a Week, posts from specific Author id = $varAuthor
<article class=”post”>(*Latest post first..)
<div class=”title”>
<h3>11/9/14 – 11/15/14</h3> (*This displays the week it is calling data from)
<p>(*Author Name placed here), (*Sum of numbers that have been input into an advanced custom field titled “quantity” in all posts by this author from 11/9/14 until 11/15/14 placed here)</p>
</div>
<div class=”content”>
<h4>Posts From This Week</h4>- (*Latest post title from this specific week and author with link to the single post placed here)
- <?php the_field(‘input_stuff’); ?>, <?php the_field(‘quantity’); ?>
- (*Next post title with link to single post placed here)
- <?php the_field(‘input_stuff’); ?>, <?php the_field(‘quantity’); ?>
(*Continued listing posts from this specific week by this specific author..)
</div>
</article><article class=”post”>(*The next post is older..)
<div class=”title”>
<h3>11/2/14 – 11/8/14</h3> (*Notice an older week is being called)
<p>(*Should be the same Author Name placed here), (*Now the sum of the numbers that have been input into an advanced custom field titled “quantity” in all posts by this author from 11/2/14 until 11/8/14 is placed here)</p>
</div>
<div class=”content”>
<h4>Posts From This Week</h4>- (*Latest post title from this specific week and author with link to the single post placed here)
- <?php the_field(‘input_stuff’); ?>, <?php the_field(‘quantity’); ?>
- (*Next post title with link to single post placed here)
- <?php the_field(‘input_stuff’); ?>, <?php the_field(‘quantity’); ?>
(*Continued listing posts from this specific week..)
</div>
</article>(*Continue posting like this until reaching the beginning of this authors posts..)
(*Pagination after every 25 posts)
I hope this doesn’t sound too complicated.. any help at all will be much appreciated!!
The topic ‘Authors, Custom Fields, Dates, Oh my!’ is closed to new replies.