Tweeted twitter.com/#!/StackWordPress/status/490604244362625024
2 deleted 120 characters in body
source | link

I am trying to solve a problem and need help :) First, I have a custom grid displaying terms and images from my custom taxonomy. This is the code I'm using currently:

<?php 

$terms = apply_filtersget_terms( 'taxonomy-images-get-terms','industrygroups' '', array('taxonomy' => $thistax)'hide_empty=false' );
$terms
echo ='<div apply_filtersclass="row">';

foreach ( 'taxonomy-images-get-terms',$terms '',as array('taxonomy'=>'industrygroups',$term 'image_size') =>{

 'medium', 'term_args' => 'hide_empty=0',// 'order'The =>$term 'ASC'is ,an 'orderby'object, =>so 'title',we 'count'don't need to =>specify 2)the );

$taxonomy.
foreach( (array) $terms as $term_link = get_term_link( $term ){;

    // If there was an error, echocontinue '<divto class="col-lg-3the col-md-3"next id="category-grid-wrappers">';term.
    if ( is_wp_error( $term_link ) ) echo{
 '<a href="' . esc_url( get_term_link( $term, $term->taxonomy )continue;
 ) . '">' .}

 wp_get_attachment_image( $term->image_id, 'medium img-responsive// img-thumbnail'We )successfully .got '<h4a class="text-center">'link. sprintf(__('%s', 'my_localization_domain'),Print $term->name)it out. 
 '</h4>' . '</a>';
 echo '<div class="col-lg-3"><a href="' . esc_url( $term_link ) . '">' . $term->name echo. '</a></div>';
}
   
echo }'</div>';

?>

What I would like to accomplish now is to use a custom field from my taxonomy term (which has been added via ACF. The field is a dropdown, displaying different Levels 1-5.

I want each chosen level to putoutput a different color border/background around the tax term shown in the grid. - In the Front End

Now, I have been trying to follow this tutorial which addresses how to accomplish this with posts, however I'm struggling to transfer this train of thought to apply to taxonomy terms. I would love some advice. Thank you.

I am trying to solve a problem and need help :) First, I have a custom grid displaying terms and images from my custom taxonomy. This is the code I'm using currently:

<?php
$terms = apply_filters( 'taxonomy-images-get-terms', '', array('taxonomy' => $thistax) );
$terms = apply_filters( 'taxonomy-images-get-terms', '', array('taxonomy'=>'industrygroups', 'image_size' => 'medium', 'term_args' => 'hide_empty=0', 'order' => 'ASC' , 'orderby' => 'title', 'count'   => 2) );


foreach( (array) $terms as $term){
          echo '<div class="col-lg-3 col-md-3" id="category-grid-wrappers">';
          echo '<a href="' . esc_url( get_term_link( $term, $term->taxonomy ) ) . '">' . wp_get_attachment_image( $term->image_id, 'medium img-responsive img-thumbnail' ) . '<h4 class="text-center">'. sprintf(__('%s', 'my_localization_domain'), $term->name) . '</h4>' . '</a>';
          echo '</div>';

    }

?>

What I would like to accomplish now is to use a custom field from my taxonomy term (which has been added via ACF. The field is a dropdown, displaying different Levels 1-5.

I want each chosen level to put a different color border/background around the tax term shown in the grid.

Now, I have been trying to follow this tutorial which addresses how to accomplish this with posts, however I'm struggling to transfer this train of thought to apply to taxonomy terms. I would love some advice. Thank you.

I am trying to solve a problem and need help :) First, I have a custom grid displaying terms and images from my custom taxonomy. This is the code I'm using currently:

<?php 

$terms = get_terms( 'industrygroups' , 'hide_empty=false' );

echo '<div class="row">';

foreach ( $terms as $term ) {

    // The $term is an object, so we don't need to specify the $taxonomy.
    $term_link = get_term_link( $term );

    // If there was an error, continue to the next term.
    if ( is_wp_error( $term_link ) ) {
        continue;
    }

    // We successfully got a link. Print it out. 
    echo '<div class="col-lg-3"><a href="' . esc_url( $term_link ) . '">' . $term->name . '</a></div>';
}

echo '</div>';

?>

What I would like to accomplish now is to use a custom field from my taxonomy term (which has been added via ACF. The field is a dropdown, displaying different Levels 1-5.

I want each chosen level to output a different color border/background around the tax term shown in the grid - In the Front End

Now, I have been trying to follow this tutorial which addresses how to accomplish this with posts, however I'm struggling to transfer this train of thought to apply to taxonomy terms. I would love some advice. Thank you.

1
source | link

Styling Taxonomy Terms Individually

I am trying to solve a problem and need help :) First, I have a custom grid displaying terms and images from my custom taxonomy. This is the code I'm using currently:

<?php
$terms = apply_filters( 'taxonomy-images-get-terms', '', array('taxonomy' => $thistax) );
$terms = apply_filters( 'taxonomy-images-get-terms', '', array('taxonomy'=>'industrygroups', 'image_size' => 'medium', 'term_args' => 'hide_empty=0', 'order' => 'ASC' , 'orderby' => 'title', 'count'   => 2) );


foreach( (array) $terms as $term){
          echo '<div class="col-lg-3 col-md-3" id="category-grid-wrappers">';
          echo '<a href="' . esc_url( get_term_link( $term, $term->taxonomy ) ) . '">' . wp_get_attachment_image( $term->image_id, 'medium img-responsive img-thumbnail' ) . '<h4 class="text-center">'. sprintf(__('%s', 'my_localization_domain'), $term->name) . '</h4>' . '</a>';
          echo '</div>';

    }

?>

What I would like to accomplish now is to use a custom field from my taxonomy term (which has been added via ACF. The field is a dropdown, displaying different Levels 1-5.

I want each chosen level to put a different color border/background around the tax term shown in the grid.

Now, I have been trying to follow this tutorial which addresses how to accomplish this with posts, however I'm struggling to transfer this train of thought to apply to taxonomy terms. I would love some advice. Thank you.