All Questions
57
questions
0
votes
1
answer
60
views
Including product categories (product_cat taxonomy) title and description in search query
WHAT I'M TRYING TO DO
I'm using woocommerce, but the question could work for WP categories also. When searching for a product, the search engine only looks for products info (title and description) ...
1
vote
0
answers
38
views
Include bbPress topics and replies in WordPress search results?
I realize this deals with a plugin (bbPress) however I hope it's still considered relevant enough to WPSE since it deals with altering WordPress search results...
How can I ensure that bbPress topics ...
0
votes
1
answer
24
views
Exclude in search post and include only 3 pages
I need that when a costumer search in my page, it includes only post but I need to included 3 important pages too... It is possible.
For include only posts I have this code, but now How can include 3 ...
1
vote
0
answers
14
views
How to add seperate classes to no-search-result and found-search-result pages on wordrpess search - is_search()
I want to add seperate body classes for no search result and found search result pages on wordrpess search.
I used that code but it isn't working - > what's the error here and what is the solution
...
0
votes
1
answer
92
views
Include the post type before the title of search results
How can I add the 'Post Type' (Blog, Page) before the titles of search results?
Post type: Title
Example: Search results for "Potato"
Blog: How to cook the perfect potato!
Page: Sweet ...
0
votes
1
answer
104
views
Limit Search to Product Pages only unless I'm on Blogpage or Blogposts
I'm using the following code to limit my search to products only (searching in the product archive).
// Only show products in the front-end search results
add_filter('pre_get_posts','...
0
votes
0
answers
205
views
Pagination repeating posts on search results
i have a problem with my wordpress search result pagination. Basically it's working as intended until i hit page 2, it then repeats the results of page one. Here is my search.php, please excuse the ...
1
vote
1
answer
497
views
Prevent A Specific Custom Post Type Showing In WP Search Results Page
I've excluded certain pages from the WP Search with the code below in my functions.php file.
I also need to exclude a custom post type called 'sites'.
I can't seem to find the custom post type ...
0
votes
0
answers
37
views
Search in WordPress
I created this function in functions.php:
function wpbsearchform( $form ) {
$form =
'<form role="search" method="get" class="searchform" action="' . home_url( '/' ) .
'" >
<div>...
1
vote
1
answer
197
views
Is there a way I can find wordpress posts that don't contain a word?
Am trying to unpublish wordpress posts that don't contain a word., Its like the inverse of search, Search is finding a string in wordpress posts, I need to find wordpress posts,. I think this will be ...
0
votes
2
answers
35
views
Limiting Wordpress Search function : Custom build
The website I am busy working on was built by another company that no longer supports Wordpress so I am looking for help. Below is the PHP for the search function. From the research Ive done it seems ...
0
votes
1
answer
204
views
How to rewrite wordpress search to work on specific category
I want my wordpress search to work on specific category within custom search, by default this actually work fine example.com/categoryname/?s=keyword
but I want to make it work like this example.com/...
0
votes
1
answer
734
views
Remove pagination if search returns empty
I made a fix that when the searchbar is empty, it returns 'No results', instead of all posts, but the pagination still shows up. Does anyone know a fix for that?
My code search.php:
<div class="...
1
vote
1
answer
992
views
Use wp_get_recent_posts with search term
I have a function that uses wp_get_recent_posts() I need to use this same function on my search page but am having problems adding the search parameter to the $args array.
Does anyone know if this ...
1
vote
1
answer
1k
views
Search filter by Post title OR Meta Title Value [duplicate]
I am trying to search Movies by it's Post title OR Meta Title value.
But it is not working, it only search's by Meta value.
I need to search by Post title as well and i.e check if the keyword is ...