Skip to main content

All Questions

Tagged with
0 votes
1 answer
37 views

What is the easiest way to create a custom field archive?

So, here is the issue: I am using a plugin named User Submitted Posts, and it works great on its part. However, I still want to have that user content page the Twenty Twenty Four theme has by default, ...
Grond's user avatar
  • 1
0 votes
1 answer
84 views

WP_Query for multiple post types just shows one

I have an issue, that I do not really understand. I hope, you can help me. I would like to have a WP_query for multiple post types: $query = array( 'category_name' => $category, 'post_type' =&...
wepli23's user avatar
0 votes
0 answers
34 views

Show the author only own types of publications. (JetEngine, Elementor)

I created a custom post called Locations using Elementor + JetEngine. I also created a User Profile Builder Dashboard with the help of this, where the user (client) can add a location. But the problem ...
user239691's user avatar
0 votes
0 answers
74 views

How to speed up WP_Posts_List_Table __construct() Query on a wordpress website with over 1 million posts?

On a website with over 1 million posts, the following from class WP_Posts_List_Table __construct() is taking a long time: SELECT COUNT( 1 ) FROM wp_posts WHERE post_type = 'shop_order' AND post_status ...
dc09's user avatar
  • 195
0 votes
1 answer
93 views

Implement AJAX 'load more' with offset posts

I am trying to implement 'Load More' functionality via a button in a WordPress theme. We are starting by displaying the first five posts using pre_get_posts in the standard WordPress query and, when ...
Alex Ryans's user avatar
0 votes
2 answers
43 views

post loop with different design depending on post

I'm having a lot of trouble finding the solution. I would like to loop my last 3 posts with wp-query. I would like the 1st post to be in one div and the last 2 posts in another different div. So when ...
user avatar
0 votes
0 answers
20 views

How to make posts_like_dislike reference current post when iterating?

I am using plugin https://wordpress.org/plugins/posts-like-dislike/ . It adds a [posts_like_dislike] shortcode. When inside the default wordpress Twenty Twenty-Three in posts "Blog Home" ...
KamilCuk's user avatar
  • 101
0 votes
1 answer
85 views

Is it possible to use the_post 2 times in one loop

I have a page on which I want to display all my posts from my custom post type, which I am able to do in a single column. However, I want to display the posts in 2 columns. For this, I will need two ...
Romit's user avatar
  • 1
0 votes
0 answers
867 views

Gutenberg block: add a multi-select for posts

I created a custom Gutenberg block with @wordpress/create-block. I now have a dropdown where you can select a post, but I would like this to be a multi-select where you can select multiple posts. How ...
azrac's user avatar
  • 1
0 votes
2 answers
453 views

WP_Query post_tilte search in posts table

Here is my array which I am trying to get "apple" keyword in post table but it can't work like I want. Please let me know what is wrong with my array? Array ( [paged] => 1 [...
Vipul Jethva's user avatar
1 vote
2 answers
223 views

How to use a conditional statement in a post loop but not count towards the "posts_per_page" if false

I have a WP_Query which has the "posts_per_page" parameter set to 12. I am then using a while loop to iterate over all of the posts and an IF statement to check whether a condition is true ...
Sam's user avatar
  • 11
4 votes
1 answer
609 views

Get related posts matching most of the provided tags using WP_Query

I need help in getting related posts using multiple tags. I have posts with the tags poetry, motivational, attitude, rules, lines, sigma and inspirations. I want related posts matching most of these ...
Ghost's user avatar
  • 43
1 vote
1 answer
61 views

Filters do not work when there are multiple (one works)

I have this functions code: function my_query($query) { if (is_post_type_archive('mycustomposttype')) { $orderby = sanitize_text_field(get_query_var('orderby')); $orderby2 = ...
Johan's user avatar
  • 309
0 votes
1 answer
379 views

Wp Query : Order by distance lat,lon

I'm new to this forum, sorry in advance :) I have a problem with my display of my posts Let me explain ^^ I want to perform an orderby => '$distance' and display the posts accordingly. $lat2 and $...
codenametest's user avatar
0 votes
0 answers
81 views

WP query taxonomy optimization

Is there any way to speed this query? Noob here. SELECT wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND (...
Milan M's user avatar

15 30 50 per page
1
2 3 4 5
31