Category Page

name?>

Showing $LOADED_ARTICLES of $ARTICLE_COUNT

‘article’, ‘posts_per_page’ => 10, ‘offset’=>0, ‘meta_key’ => ‘_pubDate’, ‘orderby’ => ‘meta_value’, ‘order’ => isset($_GET[‘sort’]) ? $_GET[‘sort’] : ‘DESC’, ‘tax_query’ => [[ ‘taxonomy’ => ‘article_category_tag’, ‘field’ => ‘slug’, ‘terms’ => $taxonomy->slug ]], ‘meta_query’ => isset($_GET[‘fdate’]) && isset($_GET[‘ldate’]) ? [[ ‘key’ => ‘_pubDate’, ‘value’ => [ $_GET[‘fdate’], $_GET[‘ldate’] ], ‘compare’ => ‘BETWEEN’, ‘type’ => ‘DATE’ ]] : [] ]; $query_articles = new WP_Query($args); $found_posts_articles = $query_articles->found_posts; $query_articles = $query_articles->posts; $post_index_articles = 0; foreach ($query_articles as $item_articles){ $post_id_articles = $item_articles->ID; $query_articles_meta=get_post_meta($post_id_articles); ?>
get_results($wpdb->prepare(” SELECT {$wpdb->prefix}posts.ID, {$wpdb->prefix}p2p.p2p_id FROM {$wpdb->prefix}p2p, {$wpdb->prefix}posts WHERE p2p_from = %d AND p2p_type = %s AND {$wpdb->prefix}posts.ID = p2p_to ORDER by p2p_id “, $post_id_articles, “article_to_contributor”)); $author_ids[0] = array_map(fn($item) => $item->ID, $c); $author_ids[1] = array_map(fn($item) => $item->p2p_id, $c); if(count($author_ids[0]) > 0): $args = [ ‘post__in’ => $author_ids[0], ‘post_type’=>’contributor’, ‘post_status’ => ‘publish’, ]; $query_authors = new WP_Query($args); $found_posts_authors = $query_authors->found_posts; $query_authors = $query_authors->posts; usort($query_authors, function ($a, $b) use ($args) { return array_search($a->ID, $args[‘post__in’]) <=> array_search($b->ID, $args[‘post__in’]); }); $post_index_authors = 0; foreach ($query_authors as $item_authors){ $post_id_authors = $item_authors->ID; $query_authors_meta=get_post_meta($post_id_authors); ?> and  2){ ?>

and others

Load More