Is it possible to make tag archive page specific to Custom Post Type?

If I understood correctly, you want a archive template for terms of core tag taxonomy that includes only your portfolio custom post type. The best way is to use the pre_get_posts action hook to set post_type argument of the query to ‘portfolio’: add_action(‘pre_get_posts’, ‘query_post_type’); function query_post_type($query) { //Limit to main query, tag queries and frontend … Read more

Modify main loop in taxonomy archive page

You could hijack the $query just before fetching the posts. function wpdev_156674_pre_get_posts( $query ) { if ( $query->is_main_query() && $query->is_tax( ‘region’ ) ) { // Manipulate $query here, for instance like so $query->set( ‘orderby’, ‘meta_value_num’ ); $query->set( ‘meta_key’, ‘event_date’ ); $query->set( ‘order’, ‘DESC’ ); } } add_action( ‘pre_get_posts’, ‘wpdev_156674_pre_get_posts’ ); References: pre_get_posts action hook WP_Query … Read more

How to show category images (from plugin) on a regular page (page-example.php)?

Untested, but something like this should work. $siteurl = home_url(“https://wordpress.stackexchange.com/”); $tax = ‘region’; // slug of taxonomy $terms = get_terms($tax); foreach ($terms as $term) { $id = $term->term_id; $slug = $term->slug; $description = $term->description; $image_url = z_taxonomy_image_url( $id, NULL, TRUE ); $link = “<a href=”https://wordpress.stackexchange.com/questions/176555/$siteurl?$tax=$slug” ><h1> $term->name </h1></a>”; echo $link; echo ‘<p>’ . $description . … Read more

Get custom field values of taxonomy terms

Are you using Advanced Custom Fields plugin? If you are, try this if it works: foreach ($terms as $term) { // $cognome_nome will be “P Elena” or “P Andrea” in your case $cognome_nome = get_field(‘cognome_nome’, $term->taxonomy.’_’.$term->term_id); }