Showing related post for custom taxonomy

Try this $tags = wp_get_post_tags($post->ID); $tag_ids = []; foreach($tags as $individual_tag){ $tag_ids[] = $individual_tag->term_id; } $args=array( ‘tag__in’ => $tag_ids, ‘post__not_in’ => array($post->ID), ‘posts_per_page’=> 4, ); $my_query = new WP_Query( $args ); //Check echo ‘<pre>’; print_r($my_query); echo ‘</pre>’;

How to set acf color field as background color to product category

The style-attribute is not in the span-tag, but should be. Further you are using the php opening tag inside of the echo tag (copy-paste?). change ‘<span class=”termek-oldal-kategoria-teszt”> style=”background-color:<?php the_field(‘kollekcio_szine’); ?>”‘ to ‘<span class=”termek-oldal-kategoria-teszt” style=”background-color:’.get_field(‘kollekcio_szine’) . ‘”>’ (sorry, I would have commented, but I don’t have enough reputation)

JS POST update data taxonomies

In this case you issue your ID while you have to look for the “name” or “value”. if( isset( $_POST[‘user_activities-‘.$useractivitie->slug] ) ) Change to: if( isset( $_POST[‘user_activities’][$useractivitie] ) )