publications

[insert_php]

//$showposts = 5;
//$paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;

//mark removed this , get_cat_ID(publication)
if (isset($_REQUEST[‘pub’])){
$anchor = $_REQUEST[‘pub’];
$cat = array(get_cat_ID($anchor));
$args=array(
‘category__and’ => $cat,
‘orderby’ => ‘post_date’,
‘order’ => ‘DESC’,
‘post_status’ => ‘publish’,
‘posts_per_page’=> ‘-1’
);
//print_r($cat);
echo “

$anchor

“;
}else if (isset($_REQUEST[‘user’])){
$anchor = $_REQUEST[‘user’];
$args=array(
‘cat’ => 193,
‘posts_per_page’=> ‘-1’,
‘meta_query’ => array(
‘relation’ => ‘OR’,
array(
‘key’ => ‘author1’,
‘value’ => $anchor
),
array(
‘key’ => ‘author2’,
‘value’ => $anchor
),
array(
‘key’ => ‘author3’,
‘value’ => $anchor
),
array(
‘key’ => ‘author4’,
‘value’ => $anchor
),
array(
‘key’ => ‘author5’,
‘value’ => $anchor
)

)
);
}else{
$args=array(
‘category__and’ => 193,
‘orderby’ => ‘post_date’,
‘order’ => ‘DESC’,
‘post_status’ => ‘publish’,
‘posts_per_page’=> ‘-1’
);
}

//print_r ($args);

$queryObject = new WP_Query($args);
//print_r ($qry);
if ($queryObject->have_posts()) {
while ($queryObject->have_posts()) {
$queryObject->the_post();
echo ‘

‘;
the_title();
echo “

“;

//print_r (get_post_meta( get_the_ID() ));

if( get_field(‘author1’) != “”){
$u = get_field(‘author1’);
echo “

Authors: ” . get_field(‘author1′).’‘;
}
if( get_field(‘author2’) != “”){
$u = get_field(‘author2’);
echo “, “.get_field(‘author2′).’‘;
}
if( get_field(‘author3’) != “”){
$u = get_field(‘author3’);
echo “, “.get_field(‘author3′).’‘;
}
if( get_field(‘author4’) != “”){
$u = get_field(‘author4’);
echo “, “.get_field(‘author4′).’‘;
}
if( get_field(‘author5’) != “”){
$u = get_field(‘author5’);
echo “, “.get_field(‘author5′).’‘;
}

if( get_field(‘conference’) != “”){
echo ‘
Where: ‘ . get_field(‘conference’) . ‘
‘;
}
if( get_field(‘date’) != “”){
echo ‘Publication date: ‘ . get_field(‘date’) . ‘
‘;
}
if( get_field(‘link’) != “”){
echo ‘‘ . get_field(‘link’) . ‘
‘;
}
if( get_field(‘file’) != “”){
echo ‘pdf‘;
}
echo ‘

‘;
/*echo ‘

‘ . get_field(‘author’) . ‘
Where: ‘ . get_field(‘conference’) . ‘
Publication date: ‘ . get_field(‘date’) . ‘
‘ . get_field(‘link’) . ‘
pdf

‘;*/

}
}

[/insert_php]