Questions tagged [search]

The method by which users find information on your WordPress site

Filter by
Sorted by
Tagged with
0
votes
2answers
716 views

Conditional posts in WP_query for search

I have a custom post type that im trying to limit results in search. The CPT is a deal/coupon, with a start and end date for each of the deals. What I'm trying to do is only show these posts in ...
0
votes
0answers
8 views

Need to display pages based on search box, but only EXTACT matches

I need to find a way to search a page based on a term that is going to work as a Password. I have a search box on my website that will help students access their Report. Then they will type in the ...
1
vote
1answer
2k views

Seach custom post type posts only by meta fields?

is it possibile to search custom post type product by _sku or other custom meta field with input text field? I don't want to use plugin, just need custom WP function. I have found this solution for ...
6
votes
3answers
12k views

Empty search input returns all posts

So today I've decided to implement a search form onto my site that obviously returns a result when the user searches for it, but I've run into a little problem. My Problem When the user searches for ...
0
votes
1answer
9 views

Is it possible to show subdomain posts in main domain search result?

I want to show subdomain posts when visitor search something on main domain. How can i do that ?
25
votes
10answers
58k views

Using meta query ('meta_query') with a search query ('s')

Trying to build a search that not only searches the defaults (title, content etc) but also a specific custom field. My current query: $args = array( 'post_type' => 'post', 's' => $query, ...
11
votes
2answers
43k views

Creating a search form for custom fields

I have built a theme for a car dealership. Each car is a custom post type ("vehicle"), and has about 12 custom fields with things such as Make, Model, Mileage, Fuel Type etc. etc. So basically on the ...
1
vote
1answer
831 views

Customising the search function?

I'm rebuilding this website - http://www.mediwales.com/news on the WP platform. I'm struggling with the search area in the grey box. I'm removing region and date so we don't have to worry about ...
1
vote
0answers
39 views

Make Wordpress Search for Both Main Domain and Subdomain

I have check through Stackexchange, but no topic is similar to this topic to this. Is there any way to make WordPress search work for both main site and subdomain? Both of them have two separate ...
1
vote
2answers
745 views

Show matching categories in search page

my current search only shows POSTS as results. http://newslines.org/?s=george My site has categories for George Clooney, George R.R. Martin etc. How do I get a list of categories that match the ...
0
votes
1answer
718 views

WordPress Search return wrong results

i limit the search in my WP blog to be within post only by adding this line <?php if (is_search() && ($post->post_type=='page')) continue; ?> So any results from static pages will ...
8
votes
6answers
26k views

How to make search include data from wp_postmeta?

I have a site using Advanced Custom Fields to create and store various bits of relevant info. These need to be included in the main general search, which by default only searches the title and main ...
0
votes
1answer
489 views

How can you include custom post meta in search without calling each key?

Looking at including the content from metaboxes in my search results but after researching I was only able to pick up two solutions: How can I include meta box content when searching? Suggests using ...
0
votes
1answer
601 views

Creating a custom search for a specific post type

Ok, so we know Wordpress comes with a built in search form. However, I've created a custom archive page that lists posts from a specific post type. I would like to integrate a search box that only ...
0
votes
1answer
20 views

I wan redirect link post search to search product woocommerce?

Search results link for the post : https://domain.com/?s=item+item I want when clicking search, the article search link automatically redirects to the product woocommerce search link is: https://...
0
votes
1answer
749 views

Exclude image url from search query

I have a question today. I have recently completed a website and there is search box integrated. And, I have a post which has an attachment(attachment's url is www.sample.com/image/sampleimage.jpg) ...
0
votes
1answer
1k views

WP Query - Search in title or author_name

My need is to have a WPQuery that searches for posts which title is 'test' OR author_name is 'test'. Here is the code I tried: $search_query = get_search_query(); $args = array( 'relation' =>...
0
votes
0answers
15 views

Exclude post_excerpt and post_content from WordPress admin search query

I am trying to exclude post_content and post_excerpt fields from WordPress admin search, since my database has grown up and every time I seach for a simple keyword, I have to wait for many seconds, ...
0
votes
1answer
702 views

Search by tag name and category

How can I return all posts that match a specific taxonomy using <?php get_search_form(); ?> For example: if a user enters a search query that matches the name of a tag or category, search.php ...
0
votes
0answers
10 views

customize_changeset website is generating urls that are causing crawl error 5xx

My website is generating urls that are causing crawl error 5xx in Google Search Console . 908 urls like this https://site url /?customize_changeset_uuid=84d5ab6d-b625-44bd-96ab-3339c5e73009&...
1
vote
2answers
28 views

Adjust the results quantity for Search Results page pagination

I'm trying to override the number of posts to show on pagination for my search.php template, to be 16 vs 4. In the Reading settings on the back end, it is set to 4, which is desired because my front ...
1
vote
1answer
715 views

How to add additional search terms (e.g. synonyms) to the search?

I'm running a blog about different software tools. I frequently use the search to find articles that I wrote for the blog. I also wrote an article about latexdiff, but always forget the name and try ...
0
votes
1answer
25 views

How to filter result set in custom metaboxes?

I am adding a plugin that adds a custom meta box on the admin woocommerce product detail page. What this does it lists the completed orders that contain the product. I was able to successfully add ...
0
votes
0answers
19 views

Admin search for custom post type shows results for everything but my post type

I've added a custom post type with this: <?php if ( ! function_exists('ordinances') ) { function ordinances() { $args = array( 'label' => __( 'Ordinance',...
0
votes
1answer
647 views

How Can I Make Dynamic Search Form While Converting Html To Wordpress?

I Am Converting Html to Wordpress. I Can Make Simple Searchform through <?php get_search_form( $echo ); ?> But I want to show Nothing Found if it can't find any data through search. How Can i ...
0
votes
3answers
22 views

Form for search pages by meta datas

Hello I need a form in one wordpress page where an user can search pages by specific meta data. I found how to do search: https://rudrastyh.com/wordpress/meta_query.html#query_meta_values But how ...
0
votes
0answers
18 views

Want to Display “No Results Page” When There Are No Results for a Particular Month

I have very minimal experience with PHP and am looking for a way to redirect to a "No Results" page when a date is selected with no results. Currently, when you select a date with no results, all ...
0
votes
0answers
14 views

How to make search instant results appear in front of other elements?

I have a search form with instant results but when there are results, it goes behind the HTML elements below it so how can I make sure that instant results appear in front of those. The error occurs ...
1
vote
1answer
735 views

Search pages that are a child of the current page

I'm developing my own Wordpress theme and I was wondering if it is possible to modify the search query in a way that it only return results that are child pages of the actual page. The reason I want ...
-1
votes
0answers
26 views

Wordpress search meta title problem

I'd like to start by saying that I only have a basic understanding of html/php/css, but I've been managing pretty well. My wordpress site uses a theme called "ListingPro." When you make a search on ...
34
votes
7answers
24k views

Extending the search context in the admin list post screen

I have created a custom post type and have attached some custom fields to it. Now I would like to the search that authors can perform on the custom post list screen (in the admin backend) to also be ...
0
votes
1answer
1k views

WordPress Admin Panel search posts with custom post meta values along with title

Trying to modify default admin search by including search by custom post type fields, Below is my code, function custom_search_query( $query ) { $custom_fields = array( // put all the ...
0
votes
1answer
18 views

Replace URL with Site Title in Search Results

When searching my company on a mobile device "Tattini Boots". You can see that the URL is displayed vs. the site title at the top (view image below). I am using Wordpress and was wondering where ...
0
votes
1answer
32 views

What are the available options for “Name” in WP search?

I am trying to find the list of available values for name in the search to filter results. So far I have found name="s" is the default name="cat" is for categories and name="post_type" is for post ...
0
votes
0answers
17 views

Change Image in Mobile Search Results

When searching my company, "Tattini Boots", on a mobile device you will see that the following cut off image is displayed next to the search result (see image below). This is not the image that I have ...
0
votes
0answers
12 views

Need to return a list based on Slug

I need a search field to return only a specific slug when the user types it. Basically, I need to create pages for students and each student page will be displayed only when user types the page slug ...
0
votes
1answer
764 views

Searchable database of members using multiple criteria / filters

I'm very new to wp let's say that first! What I need is to create a site which will list a database of members of an organisation. Users will also be able to sign-up and add themselves to the ...
0
votes
2answers
53 views

Remove “All categories” from searchbar dropdown

I have been struggling with this and could not find a clear answer online. Will putting a product search bar I have a dropdown visible with all the categories you can search in. I would just like to ...
0
votes
0answers
24 views

How to display custom search results from a selected category of a custom post type?

I have a website that has a blog and a custom post type called proyecto. They are on mywebpage.com/blog and mywebpage.com/portafolio.Each of those pages have a search field and category dropdown ...
0
votes
2answers
1k views

Searching my on my blog is not working

I've been trying for hours if not a day to try and get my custom search.php and searchform.php to work and still no success. I've read a lot on these two templates and still no success. Here is my ...
0
votes
2answers
1k views

Custom search: Search posts but display parent page in results

I'm using Wordpress 3.5.1 with a modified twentytwelve theme. My main site structure is based on the Smooth Slider plugin (jQuery Cycle). I have Pages that contain only a shortcode (for example, [...
8
votes
2answers
5k views

Remove some pages from search

On my site, I want some pages to not be queriable by the search form (so they don't appear when I've got something like www.ex.com/?s=banana) Is there a way to "Remove" pages from the search results ...
2
votes
1answer
850 views

Make Search Function include subdomain (blog.ourwebsite.com)

Wondering if there's a way to edit our search.php or .htaccess or function.php (or anything else...) so that our search function on our main site (www.oursite.com) includes the subdomain of blog....
0
votes
0answers
14 views

how to make search with two input boxes

<input type="search" id="<?php echo esc_attr( $unique_id ); ?>" class="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', 'twentytwenty' ); ?>" ...
0
votes
0answers
16 views

Woocommerce Backend Search by Title and SKU

Good morning, i'm trying to extend backend product search by using this function without success. This snippet works only in Title and i need to add also in Metakey SKU. I have tried extend by using ...
0
votes
0answers
22 views

ACF Custom user field in search query

I have created some field in user section, Now i want to search user by custom field. Like Phone of City Name. While search by first name and last name is working fine by could not get user by phone ...
2
votes
1answer
2k views

Refine Search Results

I'm looking for a simple way to achieve search filtering like this : http://ckclinical.co.uk/search/ They are obviously pointing people to a empty search and then filtering by category. I've spent ...
0
votes
0answers
11 views

Include dynamic generated pages in Wordpress search

I am creating 7-8 pages dynamically based on a JSON response from recruitee and want to include those pages in my search so that if someone is searching for "webdev" matching results are getting shown....
0
votes
1answer
2k views

Custom post archive with search, is_search() is false?

I have a custom post type, and have created an archive template, archive-custom_post_type.php, which includes a search form. I am then using pre_get_posts to add parameters to the query to filter my ...
0
votes
1answer
20 views

WP Query search for attachments and their exact title

Due to lack of reputation, I must now ask the question. I want to create a search for all images in the media libary. The search result should only appear if you search for the exact title of the ...

1 2 3 4 5 32