Jump to content

leasben

New Members
  • Posts

    3
  • Joined

  • Last visited

leasben's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have modified the code to look like this but I get an error has occurred on your site, learn more about WP troubleshooting if ( $projects_query->have_posts() ) { echo '<h3>Projects</h3>'; while ( $projects_query->have_posts() ) { $projects_query->the_post(); $term_id = get_field( 'technology' ); $term = get_term( $term_id, 'technologies' ); if ( ! is_wp_error( $term ) && isset( $term->slug ) ) { $icon = $term->slug; } else { $icon $icon = 'default-icon'; } wp_reset_postdata(); }
  2. Hi team, please assist in resolving the following issue above, below is my code: ); $projects_query = new WP_Query( $projects_args ); if ( $projects_query ->have_posts() ) { echo '<h3>Projects</h3>'; while ( $projects_query->have_posts() ) { $projects_query->the_post(); $term_id = get_field( 'technology' ); $term = get_term( $term_id, 'technologies' ); $icon = $term->slug; ?> <div class="slider_btn <?php echo $icon; ?> offices"> <a href="<?php echo get_the_permalink(); ?>"><span class="eng"><?php echo get_the_title(); ?> </span><span class="fr"><?php the_field('french_title');?></span></a> </div> <?php } } endif;
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.