Conditional Custom Field or Taxonomy for Genesis Grid Loop
-
I know this might pertain to a paid framework but I don’t think that’s the issue. I’m pretty sure its my custom taxonomy.
I’m trying to modify my grid loop to display a different title if it has either the custom field or the term dealerweb in the taxonomy city. Here’s my code:
add_filter('genesis_loop', 'custom_dealer_content'); function custom_dealer_content() { if ((genesis_get_custom_field('dealer_website'))) { remove_action('genesis_post_title','genesis_do_post_title'); add_action('genesis_post_title','custom_dealer_title'); function custom_dealer_title() { ?> <h2 class="entry-title"><a href="<?php echo genesis_get_custom_field('dealer_website'); ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <?php } remove_action( 'genesis_post_content', 'genesis_do_post_image' ); } }
Right now the conditional is set for custom field for dealer_website; however, I’ve tried the taxonomy (has_terms) and nothing has worked.
Also, I’m trying to figure out how to remove featured images from the content but its minor.
Thank you!
- The topic ‘Conditional Custom Field or Taxonomy for Genesis Grid Loop’ is closed to new replies.