Mam w spadku strone, ktora dzialala ok do czasu update ktorejs tam wersji Wordpressa i PHP na 7.4. Jako ze cos tam programowalem kiedys w C# udalo mi sie zlokalizowac ta petle ktora przestala dzialac z jakiegos powodu (mam nadzieje ze to to). Efekt była taki jak to dzialalo ze pokazywala tytuły wpisow danego rodzaju.
Prosze mądrzejszych o zerkniecie na to:
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 problems_item_servicelinks"> <span><?php _e('zabiegi' , "klinika-th"); ?>:</span> <ul> <?php $thistags = wp_get_post_tags($post->ID); // print_r($thistags); 'post_type' => 'services_cat', 'orderby' => 'date', 'showposts' => '200' ); ?> <?php $items = new WP_Query( $args ); if( $items->have_posts() ) : while( $items->have_posts() ) : $items->the_post(); ?> <?php $serviceconnectionid = get_field('tag_id'); $currtag = $thistags[$i]; $currtagname = $currtag -> name; // echo $i; if($currtagname == $serviceconnectionid): // echo $currtagname." is equal to: ".$serviceconnectionid; ?> <li><a href="<?php the_permalink(); ?>"> <?php if(get_field('main_title')){ the_field('main_title'); }else{ the_title(); } ?> </a></li>
Pozdrawiam