Questions tagged [search]

The method by which users find information on your WordPress site

Filter by
Sorted by
Tagged with
0
votes
1answer
22 views

Get search result count in plugin

Is it possible to get count of search results in plugin? I tried to use pre_get_posts action, but post_count always returned 0. I need to know if there are any search results and if not, then do ...
0
votes
1answer
28 views

How do I exclude a specific page (and child pages) from the search results?

How do I exclude a specific page (and child pages) from the search results? I've seen posts showing how to exclude all pages. I don't want that. I want to target a page and it's children and exclude ...
0
votes
0answers
10 views

How do I create a button, that when clicked, will navigate to my woocommerce store page and automatically apply specific attribute search filters?

How do I create a button, that when clicked, will navigate to my woocommerce store page and automatically apply specific attribute search filters? The tools at my disposal are Divi for front end, ...
0
votes
1answer
17 views

Showing search results on a page

I am building a company directory for a website with business news. Now what I would like is to add pages of companies with some common information and a list of published posts about that company. So ...
0
votes
1answer
19 views

Redirect Search to Form When No Product Results Are Found

Site has an internal product search. If a query has no results, I want to redirect to a contact form, and pass the query through into the form into the product name field. The problem I'm having is ...
0
votes
1answer
49 views

How to properly use AND / OR in custom search

I have a text field and a drop down with country names. If I use OR and only fill in the text field with a person's name it brings back incorrect results. If I type in the name and select a country, I ...
1
vote
1answer
23 views

Replace/Mute/Stop Search Query

I'm trying to replace the search functionality in WP. I've already created the search.php template with all the results I want to display. I don't want any results from the WP database. I just want ...
0
votes
0answers
16 views

Auto complete search very slow in wordpress admin

While adding a new post in WordPress admin, my website https://www.xingoos.com has an option to select company name. Company name must appear while typing as drop down but this search take 15-20 ...
0
votes
1answer
38 views

How can I modify the CSS only for the search results page of Wordpress?

I use the wordpress theme Sensible WP. When I do a search this is what appears as the URL: https://www.example.com/?s=my+search+text I need to modify the CSS for this page only, not all pages, but I ...
0
votes
0answers
23 views

Redirect empty search to another page

I am using the following code to change the url of my search results page: function wpb_change_search_url() { if (is_search() && !empty($_GET['s'])) { wp_redirect(home_url("/suche/...
0
votes
1answer
44 views

Search to include external content

I am very new to Wordpress and PHP in general having mostly worked on .NET CMS systems in the past so please bare with me. So, we have a Wordpress site that uses Advanced Custom fields, and Polylang ...
0
votes
1answer
134 views

How to exclude woocommerece product category in search results?

I'm looking for a way to exclude a product category from search results with Woocommerce using the pre_get_posts action and $query->set(). I am searching using the Wordpress ?s=keyword search. I know ...
1
vote
1answer
251 views

How to display search results in search.php

I am trying to display search results in search.php , but no results showing. it just show this search results for: then the keyword I put in the search box only nothing more. so the actual results ...
0
votes
1answer
17 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
0answers
11 views

Woocommerce: Search by custom location

I have created an attribute for Woocommerce products which is named: Location. On Home Page I want to Put a custom search bar and a drop-down list where i can search product available to a particular ...
0
votes
0answers
13 views

How to create a list of items with filter/search bar?

On Wordpress, how can I create a list of items with a search bar on top like on this website? https://www.mostrecommendedbooks.com/
0
votes
0answers
6 views

Capture search term, input into 2 searches and output data on 1 page

Apologies if this may seem trivial but, although i've been working with Wordpress for a few years now, i only recently started using slightly more complex code implementations. What i am trying to do ...
0
votes
0answers
9 views

Metabox for searching/selecting arbitrary pages?

I'd like to create a meta box for my pages that allows me to declare arbitrary links to one or more related pages, with the idea being that I could then render these after the page content. E.g. "If ...
0
votes
1answer
51 views

Using ElasticSearch on Wordpress

I am a noob so appreciate your patience :-) I am trying to use ElasticSearch with a Wordpress installation using the ElasticPress plugin. All configured and in production. Amazing results so far. ...
0
votes
0answers
15 views

Creating an Organized Search Results Page

I'm trying to create a search results page that separates everything out in their own section. For Example: Blog Posts Blog Posts Search Results Pages Pages Search Results Press Releases Press ...
0
votes
2answers
295 views

pre_get_posts and search query for admin

I'm going round in circles with trying to include several custom fields in my search results. The custom fields are managed via ACF. At first I want this for the admin. /wp-admin/edit.php?post_type=...
1
vote
1answer
156 views

Admin search not working for any type of post

Wordpress admin search is not working for any type posts i.e posts,pages,comments or any other custom posts. Whenever trying to search for say string without quotes "my new post"** it always returns. ...
0
votes
0answers
15 views

Do widgets support input from users (not admin users)

I am trying to create an autocomplete widget for wordpress to add to an existing custom theme. My question is if this is even possible or are widgets strictly only for displaying information? The ...
0
votes
0answers
16 views

Block access to all WordPress “data” outlets

I've got an issue. I want to know all WordPress "secret" urls (so I can block them) For examples: Https://example.com/feed That exposes the posts. Is there some address that displays all tags/...
0
votes
0answers
20 views

Get related posts from another WordPress site?

I have a client who owns 2 news websites, both are WordPress sites but it does not use WordPress multisite (they are 2 separate WordPress installs), both currently use Jetpack to return a list of ...
0
votes
0answers
11 views

Excluded category from SQL query but not excluding posts from that category

I am creating a custom search for my site and written following query. I am getting problem with the query. I have excluded some category IDs like 144, 303, 333. It is excluding these categories but ...
0
votes
0answers
13 views

Including custom field term in search results

I have a custom field (set up using Toolset) set on certain posts on my site which dictates that those posts load with a specific template (there are a number of other display options as well, which ...
0
votes
0answers
21 views

WordPress Live Post Filter

I'm trying to filter posts as you type on a search bar, or filter by category on click. The blog page has all the posts, a search bar on top and a-tags to act as the category filters - just don't know ...
1
vote
0answers
22 views

Check for taxonomy archive on search results page

I'm looking for a conditional tag to check if a taxonomy archive page(link) is displayed on my search results page. is_tax(); only seems to check if the current page is a taxonomy archive page and ...
0
votes
2answers
163 views

Woocommerce Multisite global search how to mod ajax function?

I created an installation of my multisite ecommerce to differentiate the men's and women's departments. Often, however, it happens that in the men's department they do research related to women's ...
0
votes
1answer
18 views

Search results - 404 error after hitting enter

So I am using a theme from envato and there's extremely poor response from the support team and I hate not trying things on my own. On the website I am working on right now there's a problem with ...
0
votes
1answer
42 views

Redirect wordpress search query if its a tag

i have modified this function to make it redirect search query if it a tag example if searchQuery='football' then redirect to /tag/football/ function redir_search($a) { if (is_search()) { ...
0
votes
0answers
9 views

Search Result shows blog archive format instead original page

whenever I search in search feature of wordpress using theme - Hestia, it shows result in blog archive form but I want result in the original page form. I unable bro find solution please help me. Also ...
0
votes
0answers
31 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>...
0
votes
0answers
112 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 ...
0
votes
1answer
22 views

How to exclude specific post_type from default search?

I'm trying to exclude WooCommerce products from default WP search, but I need to keep all other posts types, including CPT and those CPT created in the future. Im trying with: function searchFilter($...
1
vote
1answer
57 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
0answers
29 views

Search Highlight comes with error on excerpt in search result

I'm not sure what's going wrong. I'm using a "search highlight" on my wordpress website. I recently noticed 1 issue when doing a search on my site. How to say? Hmm...For example, either post excerpt ...
0
votes
0answers
35 views

Custom Search For Custom Post Type and Taxonomy

This is my first question. I have a custom post type: quote. I'm using a non-hierarchical taxonomy quote-writer to show the author of the quote and a hierarchical taxonomy quote-topic to show ...
1
vote
1answer
47 views

How to loop for every result found in the_content() when using the search query?

im doing a custom search result page with function that extract from the_content() some words before and after the search query. (Eg ?s=cool result=[...sterday was cool and the par...] It's working ...
0
votes
0answers
12 views

Save search after customer registration

I have a property website where customers can book accommodation. However, after the customer is searching for the accommodation, they are required to log in (Register). The problem is that after ...
0
votes
1answer
14 views

Category Search / Custom Post Type search on my website. Custom Post Types that are “page-like”?

I am creating an educational website and some of my pages are "subjects" like math, physics etc and I want them to be searchable. How do I do this? I thought that it would be easy if I just made a ...
0
votes
0answers
38 views

Include search by product_tag in search results

When I use the search form for products in my WordPress page, the search doesn't take the product_tag property into account. How do I change that? I basically want a query combination like ...
0
votes
1answer
28 views

Send admin an email when a user's search has no results

I'm new to WordPress. What is the easiest way to trigger an email to admin when a user's search has no results.
0
votes
0answers
36 views

Fix Potential Security Issue in Custom Taxonomy Search Functionality

I want to add some functionality to a client WordPress site that allows you to include taxonomy terms from custom post types in the Wordpress search, and come across the following answer: Include ...
1
vote
2answers
41 views

Standard Wordpress Search does not work / Search-results are not displayed / Custom template

My search-results are not displayed. Instead searches show a 404. See https://startupsagainstcorona.com/solutions/ for testing. Can someone help? What did I do? I implemented the standard WP-search ...
1
vote
0answers
16 views

Find user by nicename and open profile

I want to add filter function and show user profile page by using search form. This is what I have now: function test_where_filter($where){ global $wpdb; if( is_search() ) { $search= ...
1
vote
0answers
31 views

Is there a link parameter that will show me all my published pages?

Is there any way to display a loop of all the pages that are published on my website, via a link? (Even while logged out) For example, I can type in domain.com/?s=text and that will create a post ...
1
vote
1answer
140 views

How do I use a block to display search results?

We are using the search gutenberg block on a new gutenberg site for our search form, but can't figure out which block to use on the search results page to display the search results? https://github....
1
vote
0answers
22 views

Making custom field serchable in woocommerce [duplicate]

I have a product field which is by default in the woocommerce and i have added another field custom field (ACF) which is stock_number on my product/shop page i can search for products by title only i ...

1 2
3
4 5
34