Questions tagged [query]
A generic term referring to the process of retrieving information from a database.
1,894 questions
2 votes
1 answer
34 views
Customized WordPress search URL to same post and search results
We used the following code, If search correct post name or URL (panda) in WordPress search box, users redirect to the same post like https://example.com/panda/. It's well. While search wrong keyword, ...
0 votes
0 answers
36 views
How to setup a listing inside a listing with the correct context (Bricks and JetEngine) [closed]
I have a listing displaying data from a CCT called “atri_mob” in a single page of a CPT “listas”. It works based on a query that pulls all of the atri_mob CCTs related to the current CPT via a ...
0 votes
1 answer
48 views
Help with query
Hey guys so currently on my homepage I have it setup so it first shows the most recent 10 posts (of all categories) and then that's followed by the most recent 10 posts of each specific category. But ...
1 vote
1 answer
117 views
Trying to Add Paging to Single Post Page
I have a custom post type called "catalog". This page, when viewed, has a section in the page that lists items from another cpt, items from the current catalog being viewed. What I am trying ...
1 vote
0 answers
57 views
prepare select of array
Odd one this. I have been working on this particular query for a few days now. The idea is to use the variables selected from first query to be used in second. ($project_id = $_GET['project_id'])|| ($...
0 votes
1 answer
57 views
How to make WP_Query faster when getting a post from one year ago?
I'm trying to get one post from today's date a year ago, and the code below is shown to be a slow query in Query Monitor. What is a more efficient way of querying for a post from a year before today's ...
0 votes
2 answers
101 views
How to allow searching a custom meta key in admin list table?
I have a custom post type and would like to search titles AND a custom meta key. I have tried several different things, but can only search through titles OR my custom meta key, not both. I don't need ...
0 votes
0 answers
18 views
Display all products outside of filtered function
I have a products page which displays products based on filters. I believe I have found the code in which all of the products are queried. Normally, if a customer selects an attribute such as '...
0 votes
0 answers
65 views
Issues applying JSON body filters in EU F&T Portal SEARCH API with WordPress integration
I am trying to use the SEARCH API service of the EU F&T Portal public REST APIs for retrieving data for further integration with my project, but I am having some problems. I am using WordPress as ...
1 vote
1 answer
342 views
SQL errors when querying for something with apostrophes
I have the below PHP function that queries some custom database tables and outputs the result. This generally works great, except for when I put an apostrophe in the query; for example, "Men's&...
1 vote
0 answers
27 views
Dinamis Query Loop template Custom Post Type dan Taxonomy di WordPress Blocks dengan PHP
Google Translated: Hello everyone, I’m trying to create custom blocks in WordPress that dynamically display posts from custom post type that I’m creating, which is “products”. I also want to sift the ...
0 votes
1 answer
149 views
Primary menu item is not highlighting when page is active even though it is linked from a url with query string to pre-populate a form field
I'm using the WordPress Astra theme. I have set Astra customization to highlight the active page primary menu item in the navigation bar. However, when I link to the "Contact" page using an ...
0 votes
1 answer
78 views
Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder
I am getting the following error: Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. I have gone through plenty of other similar questions ...
1 vote
1 answer
108 views
Problem in MySql query on Wordpress [closed]
According to https://developer.wordpress.org/reference/classes/wpdb/ I'm trying to retrieve a value in a WP table with a simple query <?php global $wpdb; $results = $wpdb->get_results( "...
0 votes
0 answers
38 views
"Page Not Found" with multiple last pages of query
Issue When accessing the URL https://192.168.1.100/page/30/ in WordPress, I receive a "Page Not Found" error. The query has a maximum of 50 pages, with pages 1-29 displaying correctly. Pages ...