Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Largo_Related tests and bugfixes #842

Merged
merged 16 commits into from
Aug 17, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions inc/related-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ protected function cleanup_ids() {
* Fetches posts contained within the series(es) this post resides in. Feeds them into $this->post_ids array
*
* @access protected
* @see largo_series_custom_order
*/
protected function get_series_posts() {

Expand Down Expand Up @@ -488,7 +489,9 @@ protected function get_series_posts() {
// see if there's a post that has the sort order info for this series
$cftl_query = new WP_Query( array(
'post_type' => 'cftl-tax-landing',
'series' => $term->slug,
'tax_query' => array (
'series' => $term->slug,
),
'posts_per_page' => 1
));

Expand All @@ -500,12 +503,13 @@ protected function get_series_posts() {
case 'ASC':
$args['order'] = 'ASC';
break;
// 'series_custom' and 'featured' are custom ones, caught with largo_series_custom_order in inc/wp-taxonomy-landing/functions/cftl-series-order.php
case 'custom':
$args['orderby'] = 'series_custom';
break;
case 'featured, DESC':
case 'featured, ASC':
$args['orderby'] = $opt['post_order'];
$args['orderby'] = $has_order;
break;
}
}
Expand Down
Loading