All Questions
Tagged with wp-query query-posts
368
questions
0
votes
1
answer
19
views
Adding a language rule and displaying posts with a custom taxonomy term on its archive page
The WordPress website I'm working on is available in two languages using Polylang, en-US and en-PH. I use CPT UI and have a custom taxonomy "subtopic" that is not multilingual. Under "...
0
votes
1
answer
19
views
Modify WordPress Search
I'm facing a challenge with a WordPress project and I would appreciate the community's help in solving it.
The issue lies with the search functionality. When customers type in a search term, such as &...
0
votes
1
answer
18
views
post per page for differents post types in a same query
How can I make a query and in the same query query many types of publications and also define the number of publications for each one.?
This is what I have in my query
$post_types = array('infografias'...
0
votes
2
answers
238
views
Exclude first post from wp query
I am building a WordPress website and I want to show post in it. But the problem is that, I want to exclude the first post in query. I have not much knowledge of PHP. So please help me to de this.
...
0
votes
1
answer
52
views
new WP_Query with order args – no more distinction between categories
I try to change the post order on all of my category/archive pages from the WP standard to having them sorted by their modified date. I modified a part of the loop.php from my theme (derived from ...
0
votes
1
answer
37
views
How do I exclude the current post from the upcoming post query
Summary: I have a page template with 3 queries.
Current Exhibition
Upcoming Exhibition
Past Exhibition
The dates are custom fields. The problem I'm having is, how do I dynamically exclude the ...
0
votes
1
answer
535
views
Display ACF object field data using Elementor Custom Query
Hello i'm working on a website using elementor pro + ACF.
I have create a custom post type (CPT1) with ACF object field that take another CPT2 as values. I would like to display on my CPT1 page all ...
0
votes
0
answers
125
views
Optimising WP_Query with ACF Fields
I am wondering if it's still possible to optimise the WP_Query or also if there's another way of doing it. I have the post type and a custom post type called case-study which gets displayed on the ...
0
votes
1
answer
24
views
change the default order of posts only for specific categories
I want to change the default ordering for posts, to last modified date, but only for certain categories pages (when visiting certain category pages)
I have this function code, which is working, but I ...
0
votes
0
answers
718
views
Elementor posts custom query based on tag [closed]
How can I filter the Elementor Posts widget with a custom php query that returns posts with a specific tag attached?
I want to do something similar to this:
function my_query_by_post_types( $query ) {
...
0
votes
0
answers
272
views
Custom Query: Multiple CPTs and a taxonomy filter
I want to create a post feed that displays the following:
ALL posts in the CPT 'custom_post_type_1'
Any 'post's in the category 'speakers'
So far, I have this filter which displays all posts in '...
1
vote
0
answers
208
views
Query post and sort by custom value calculated with custom field on cpt
I shall made a query post ad I have some issue to sort the posts.
I have multiple custom fields that calculated in php (with some operators) a final value for each posts - I call it $price.
These ...
0
votes
1
answer
119
views
How to make posts unqueryable/unpublish posts where ACF relationship field is an unpublished post? [closed]
I am using ACF Pro to make a relationship between two custom post types.
One CPT is a thing and the other is a Container of Things. I need to solve the issue of things within a container of things ...
0
votes
0
answers
59
views
WP query_posts group by meta field related
Hello Guys i am trying to customize a wordpress theme and am getting this is How it queries All Posts with episodes post_type.
My Question Is.
this Post type is related to another post_type which is ...
0
votes
1
answer
123
views
Conditional operator OR not working with custom fields
OR operator is not working for both conditions, only check first value if true then code executed and if first is false then not check 2nd condition and return else output.
I also try with LIKE ...