Can someone please help me figure this out????
-
I am trying to recreate the functionality on this page in WordPress: https://iwearyourshirt.com/testimonials (click on the customers to see the content at the top of the page change)
I am close, and it works with this code:
<?php $my_query = new WP_Query('cat=7'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?> <div class="reviews-date"> <?php the_date(); ?> </div> <a href="#self" onclick="document.getElementById('expansion').innerHTML = '<?php the_title() ?>';">This is an example</a> </div> <?php endwhile; ?>
But when I try to add <?php the_content() ?> right after <?php the_title() ?> in the innerHTML portion the entire content is displayed, no links like they are supposed to be.
The working example is up right now. I can put in the non-working example if you need me to. Thanks.
The site: https://billboardfamily.com/our-reviews/
- The topic ‘Can someone please help me figure this out????’ is closed to new replies.