';
//* args for dropdown
$current_category = get_queried_object();
$news_type_args = array (
'show_option_none' => 'All',
'orderby' => 'name',
'taxonomy' => 'news_events_categories',
'hide_empty' => false,
'id' => 'news_events_categories',
'name' => 'news_events_categories',
'class' => 'news_events_categories',
'echo' => 0,
'value_field' => 'slug',
'hide_empty' => 1,
'depth ' => 1,
'hierarchical' => 1,
'selected' => $current_category->slug
);
//* label + showing dropdown
echo '';
echo wp_dropdown_categories( $news_type_args );
echo '
';
/* echo '';
//* args for dropdown
$news_events_year = array (
'show_option_none' => 'Select Year',
'option_none_value' => 'press-releases',
'orderby' => '',
'taxonomy' => 'news_events_categories',
'hide_empty' => false,
'id' => 'news_events_year',
'name' => 'news_events_year',
'class' => 'news_events_year',
'echo' => 0,
'value_field' => 'slug',
'hide_if_empty' => 1,
'depth ' => 0,
'hierarchical' => 1,
'child_of' => 0,
'order' => 'DESC'
);
//* label + showing dropdown
echo '';
echo wp_dropdown_categories( $news_events_year );
echo '
'; */
//global $post;
$args = array(
'post_type' => 'news_events',
'posts_per_page' => 4,
'paged' => get_query_var( 'paged' )
);
// global $wp_query;
$wp_query = new WP_Query( $args );
if ( have_posts() ) :
echo '';
while ( have_posts() ) : the_post();
$post_id = get_the_ID();
//* get post terms and store to array
$news_events_terms = get_the_terms( $post_id, 'news_events_categories' );
//* array to store terms names
$all_news_events_terms_names = array();
$all_news_events_terms_slug = array();
foreach( $news_events_terms as $news_events_term ) {
array_push( $all_news_events_terms_slug, $news_events_term->slug );
array_push( $all_news_events_terms_names, ''.$news_events_term->name.'' );
}
//* implode with "," sign more than 1 term
$all_news_events_terms_names = implode( " ", $all_news_events_terms_names );
$all_news_events_terms_slug = implode( " ", $all_news_events_terms_slug );
echo '
';
endif;
wp_reset_query();
// }
add_filter( 'excerpt_more', 'news_excerpt_more' );
function news_excerpt_more( $more ) {
return '...';
//* show term names
if ( ! empty( $all_news_events_terms_names ) ) {
echo ''. $all_news_events_terms_names .'';
}
echo''; the_time('F j, Y'); echo'';
echo'
';
endwhile;
// do_action( 'genesis_after_endwhile' );
echo ''; the_title(); echo'
'; the_excerpt(); echo'More About Event'; echo'Read Press Release'; echo'Read more'; echo ''; } add_filter( 'genesis_prev_link_text', 'modify_previous_link_text' ); function modify_previous_link_text($text) { $text = 'Previous Page'; return $text; } add_filter( 'genesis_next_link_text', 'modify_next_link_text' ); function modify_next_link_text($text) { $text = 'Next Page'; return $text; } ?>