Three different queries on same page
Three different queries on same page
Three different queries on same page
As documented, if you’re using post__in to query a specific list of posts and what the results returned int he same order you need to set orderby to post__in: $args = array( ‘posts_per_page’ => 8, ‘post__in’ => $kiemeltek, ‘orderby’ => ‘post__in’, );
It seems like, you have added permalink for categories inside span tag. Where do you want to add permalink actually? If you want to apply permalink for post title, then add permalink inside <h4> tag. currently your href is empty inside <h4> element. <h4 class=”post-title”> <a href=”<?php echo get_the_permalink() ?>”><?php the_title(); ?> </a> </h4>
wp_count_posts is not affect your custom query. You can use found_posts to return the number of posts from the custom query. So try to change the code after your loop query as follows. Hope it helps. if ($loop->have_posts()) : $count_posts = $loop->found_posts; echo “<p>Total: $count_posts cars</p>”; else : echo “<p>No cars available.</p>”; endif; wp_reset_query();
There are 3 problems here It’s Using a Non-Standard Date Format The dates are being stored like this: 20230131 Which is ok for us as we can interpret that as a date with no spaces, but it needs to stored like this: 2023 01 31 Specifically, it needs to be timestamp like this: YYYY-MM-DD HH:MM:SS … Read more
Give attachments an archive page, and exclude unattached ones
I noticed your filter function is using get_query_var() which automatically parses URL/form parameters from the superglobals $_GET and $_POST, but only if the parameters are registered as public query vars. Were you aware of that, and have you registered the orderby2 parameter as a public query var? Because in my case (WordPress v6.1.1), the 2nd … Read more
This can be done in multiple different ways. Depending on the context, one way may be better than the other ways. Using WP_Term_Query class: Most wp_term related queries are internally done using the WP_Term_Query class. So if you need different options, using this class can be very useful. For example: // all of these arguments … Read more
To generate the labels for your chart with the dates for the last 7 days (including the current day), you can use the Date object in JavaScript to generate the dates. Here’s an example of how you can modify your code to do that: // Generate the labels for the chart var labels = []; … Read more
I’m a noob. I named the Taxonomy wrong… It’s post_format not post-format