Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixing more inconsistencies
  • Loading branch information
jmr06005 committed Dec 10, 2015
1 parent c41c322 commit 5d88867
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 216 deletions.
212 changes: 0 additions & 212 deletions inc/user-people.php

This file was deleted.

15 changes: 11 additions & 4 deletions user-people.php
Expand Up @@ -79,15 +79,17 @@ get_header(); ?>
global $args;
$post__in = array();
foreach($specific_people as &$value){
array_push($post__in, $value->ID);
//array_push($post__in, $value->ID);
array_push($post__in, $value);
}
$args[post__in]= $post__in;
}

// do we need a tax query?
if ($specific_groups != false || $specific_tags != false){

$tax_query = array();
$tax_query = array();
$isTagSet = false;

if ($specific_groups != false) {
$group_query = array(
Expand All @@ -98,6 +100,7 @@ get_header(); ?>
array_push($tax_query, $group_query);
}
if ($specific_tags != false) {
$isTagSet = true;
$tag_query = array(
'taxonomy' => 'persontag',
'field' => 'term_id',
Expand All @@ -121,7 +124,8 @@ get_header(); ?>
$groups_in_use = array();

foreach($people as $value){
$id = $value->ID;
//$id = $value->ID;
$id = $value;
$terms = get_the_terms($id, 'group');
if (is_array($terms)){
foreach($terms as $key => $value){
Expand All @@ -147,6 +151,9 @@ get_header(); ?>
'terms' => $value
);
array_push($tax_query, $group_query);
if( $isTagSet != false ){
array_push($tax_query, $tag_query);
}
$args['tax_query'] = $tax_query;

// with $arg updated, let's do a new query.
Expand Down Expand Up @@ -202,4 +209,4 @@ jQuery(window).load(function() {
adjustImages();
});
</script>
<?php get_footer(); ?>
<?php get_footer(); ?>

0 comments on commit 5d88867

Please sign in to comment.