Home Forums ACF PRO ACF Pro: Taxonomy field multiple


ACF Pro: Taxonomy field multiple

  • Hi everybody,

    I’m using ACF Pro and a Taxonomy field with multiple taxonomies selection.
    With a second field (number to choose the number of post)
    Everything fine:
    I can make a new wp-query display post from multiple taxonomies as this:

    $newscat = get_sub_field('selection_categorie');
    if( $newscat ):
    $newsnumber = get_sub_field('nombre_strat_categorie');
    $args = array(
       'post_type' => 'post',
       'cat' => $newscat,
       'posts_per_page' => $newsnumber,
    $my_query = new WP_Query($args); ... 

    That’s perfect…

    After this a would like to make a “view all post” link button to show all the post.

    I used this:

    $terms = get_sub_field('selection_categorie');
    if( $terms ):
    foreach( $terms as $term_id ): 
    	$term_name = get_cat_name( $term_id ) ;
    	$term_url = get_category_link( $term_id ); ?>
    	<a>"><?php echo $term_name; ?></a>
     <?php endforeach;  endif;    ?>

    First, it’ seems to be ok … but i have as much as taxonomy links.

    What i would like to reach is to have 1 link (something as get_category_link()) but with all taxonomies
    Something as get_category_link(tax1+tax2+tax3)

    Any idea to help me?

    Already thank to everebody


Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.