Why is my loop not populating the page with my custom taxonomy terms from my custom post type?

You need to specify the post type in argument and need to use the taxonomy tag properly. You can try the following args variable. $args = array( ‘posts_per_page’ => 10, ‘post_type’ => ‘series’, //Specify the post type here ‘paged’ => $paged, ‘tax_query’ => array( array( ‘taxonomy’ => ”, //specify the taxonomy name ‘field’ => ‘slug’, … Read more

ACF background-color per post in a WordPress loop

Well, your problem lies in your CSS code. .card-container .main-content:hover { background: <?php the_field(‘background-farbe’ ); ?>; background-blend-mode: multiply; } It uses class only, so it will be applied to every element with that class. Multiplying the same code with different colors won’t change anything – only one such rule will be active. So how to … Read more

Regarding a custom loop and output HTML tags

It seems you are confusing actions and filters here. You are using an action. That means if you want to output some html you have to that inside the function. Now your are returning the value, but nothing is done with it. So in the last line of your function you should have echo $title_yama … Read more

Adding a Section for Visitors

This forum is to get answers to (technical) problems, whereas you are asking for opinions. The “challenge” you’re having can be solved in different ways. For starters the comment form could be used and it should be possible to add additional fields. See add_comment_meta() (https://codex.wordpress.org/Function_Reference/add_comment_meta) Another way could be to add use a form to … Read more

WP_Query & Duplicate entries

There shouldn’t be a foreach loop inside the while. The while loops over posts, so you don’t need another foreach. The while loop in this context is what WordPress calls “The Loop”. See the section of documentation for The Loop on secondary queries here. So your loop should look like this: <?php while ( $posts->have_posts() … Read more

How to use `foreach()` in ajax call

I see that you found the error in the comments given to you on the post, and that is good. However, it should be pointed out that your code contains both an SQL Injection vulnerability, as well as a Reflected XSS vulnerability. $catId = $_POST[‘key’]; // value from the ajax … $result_fromDB = $wpdb->get_results(“SELECT * … Read more