All Questions
69
questions
0
votes
0
answers
22
views
Display posts based on the selected category when no subcategory is chosen
The following code displays posts based on subcategory. First dropdown is a custom taxonomy category, second dropdown narrows down the search to subcategories associated with selected category. My ...
0
votes
0
answers
31
views
I want to add another search box on posts page in dashboard
There is already a search box in wordpress dashboard for posts, products, pages etc. in their listing page.
My client use wordpress admin with their phone so he requested another search box on top of ...
0
votes
0
answers
17
views
My worpress search page is showing no results
I want to display the publications searched for via searchform.php in the search.php page but it does not work ...
The search is done well when I look at the url (ex: New World):
http://localhost/?...
0
votes
0
answers
33
views
Is it possible to get the specific content on the search page?
I am working on the WordPress search. I am using the below code to get the data on the search page.
$s=get_search_query();
$args = array(
's' =>$s
);
$query = ...
1
vote
1
answer
741
views
Build A Custom SQL Query for WordPress Search
I was working on a code, where I used SQL to find something on my site.
I realised that the SQL was giving me far accurate search results, and wanted to implement the same in my WordPress search query....
0
votes
0
answers
18
views
Showing Posts if non are found
I'm trying to write my search.php that it shows the posts when searched for but when non post match the search, it just shows all posts again (like on the index).
This is my code at the moment. It ...
0
votes
0
answers
21
views
search form for custom fields
I want to create a custom search for pin code search with custom fields value.
When exact match with pin code will show the post data
Can you please help me?
Any help in this matter would be ...
0
votes
0
answers
138
views
How to show posts in grid style on search result page?
I want to show posts in a grid-style layout on the search result page when someone searches for something using the search bar. Right now it is showing a list-style layout. I also want to hide the &...
0
votes
0
answers
55
views
Search results with pagination not working
I've got a news page with a search bar functionality. On this page I want a user to be able to enter a term and the contents of that page will be updated depending on what the user has entered. I don'...
0
votes
1
answer
32
views
Create a post automatically if search result has zero results
I'm developing a site where people can search phone number(s), the most complex part is that i want to create a post automatically when someone search for a specific number if that phone number yield ...
0
votes
1
answer
81
views
How to show only homepage in google results instead of privacy, contact pages
When I search my website in google, all the pages and posts can see. I want to make only homepage visible in search results and remove other pages(privacy, contact etc). And also all the posts can ...
0
votes
1
answer
355
views
See if a post has a specified tag
I'm trying to see if a post (thru id) has a specified tag
if has_tag( $tag = 'Cat', $post = $post_id ) {
$taganimal = "Cat";
}
I tried this, but it just crashes the site .
Got idea ...
0
votes
1
answer
1k
views
Redirecting wordpress search query to archive page
My sincere apologies for asking this question as I am quite certain that this is a relatively easy topic, unfortunately my many hours of searching got me no satisfying results. I do not mind ...
2
votes
1
answer
3k
views
Search not working with title and content
I am working on search. I am able to search post by tag and category but not able to search by title and content.
I tried below code but it's not working. Would you help me out?
$getSearch = ...
0
votes
1
answer
6k
views
How to search through "post title" and "tags" using WP_Query?
In my custom search form, i'm currently using these kind of $args with my WP Query:
$args = array(
'post_type' => 'post',
'posts_per_page' => $postsPerPage,
'offset' =&...