Is it possible to use the_post 2 times in one loop

Yes, but not by calling the_post twice in a loop. Instead, use 2 loops and rewind_posts. The first loop displays column1 and skips even posts. Then you call rewind_posts() to go back to the beginning. The second loop displays column2 and skips odd posts. After the first loop, call rewind_posts(); and it will rewind the … Read more

Custom fields disappearing when a custom post type is assigned

I ended up solving this on my own and thought I would come back to show my solution. On my taxonomy page I needed to get the current taxonomy term like so: <?php $term = get_queried_object(); if (get_field(‘subtitle’, $term)) { ?> <p><?php the_field( ‘subtitle’, $term )?></p> <?php } ?> Here is the documentation page: https://www.advancedcustomfields.com/resources/adding-fields-taxonomy-term/

WordPress duplicating posts from single loop

Unless I’ve mis-interpreted what you are trying to accomplish, you added the foreach loop and you don’t need it. Having it run while inside a while loop seems to be duplicating your intentions. Remove the foreach loop altogether, delete the first wp_reset_postdata();, and un-comment the 2nd one: <div id=”carouselTestimonial” class=”carousel slide” data-bs-ride=”carousel”> <div class=”carousel-inner”> <?php … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)