Questions tagged [search]

The method by which users find information on your WordPress site

Filter by
Sorted by
Tagged with
0
votes
0answers
4 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
8 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
10 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
7 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
1answer
15 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=...
0
votes
0answers
15 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
13 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
12 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
18 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
6 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
11 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
10 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
107 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
11 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
33 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
25 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
17 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
15 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($...
0
votes
0answers
16 views

Why does search result page vary?

I have a knowledge base website where users can search for a term and they get various articles, containing that term, either within the title and/or within the body of the post. My issue is as it ...
1
vote
1answer
31 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
19 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 ...
-1
votes
0answers
25 views

PHP7 issues with Hub2Word plugin

I have the Hub2Word plugin in place that is being used to include Hubspot posts in the search results of my WordPress 5.4 site. It was generating a number of PHP notices and not pulling in any Hubspot ...
0
votes
0answers
19 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
20 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
10 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
12 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
17 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
24 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
28 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
25 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
14 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
33 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
20 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 ...
0
votes
0answers
9 views

Adjustment of the text excerpt of the search

Is it possible to use functions.php to get a text snippet around the search term and not the first 55 characters of a post? I hope I made myself understood. I would like to receive a text excerpt (...
0
votes
0answers
24 views

Help me understand how Search function works using dynamic_sidebar()

On my existing website, there is a search box at the top of the page. My understanding is that it's from this code in header.php <div id="search_sec"> <?php dynamic_sidebar('search');?&...
1
vote
1answer
11 views

Get PDF in media by ID

On my search page, I've added all the file from the media with this code : function attachment_search( $query ) { $args = array( 'public' => true, '_builtin' => ...
0
votes
0answers
12 views

how to exclude specific pages form wordpress search results?

I want to show only today's events and the next events in Worpdress search results for every post with category "events". This is my code and it doesn't work, the events that have ended still appear ...
1
vote
0answers
21 views

Separeting product from post in search result

I am trying to separete products from posts in the search result. I can see the loop there search in both. if( have_posts() ) { while( have_posts() ) { ...
1
vote
0answers
11 views

how to create search and filter form generating “plus” symbols in url in between category names?

How to create search and filter form to use multiple categories and tags checkboxes? I'm tried to do it standard way, but it gives me wrong filter results &categories=vitamins&types=gainers&...
1
vote
1answer
38 views

what are the checksums surrounding keywords in the SQL generated by WP_Query and do I need to use them too?

I am using posts_join and posts_where filters to include a custom table in a query. this page says I should "use whatever WordPress did to search the post title field to search my custom table fields ...
0
votes
0answers
14 views

WooCommerce - When searching return category only, not product

Is there a way to set a WordPress search result to not display a WooCommerce product, but instead the category page it belongs to? My specific layout doesn't use product detail pages, you purchase ...
0
votes
0answers
27 views

Replace Woocommerce products url in search results to point product category page

I have to change product links in search result page to point specific category instead to product page. I want to get category of returned product and create link based on that. Example: Product: ...
0
votes
0answers
29 views

Filter admin ajax data by url query

I am new on ajax query, How can I filter admin-ajax data in the URL query? I am working on a search page where I am getting all the WordPress user data from admin.ajax.php, that is working fine. ...
0
votes
1answer
174 views

Filter WP user acf field by ajax

I have a search page where search result of user is displaying by postal code or county name. while on the search page i have checkbox to filter user by attribute like developer, designer, and account,...
0
votes
0answers
27 views

How to include more wordpress tables/columns in the search

How to include more Wordpress tables/columns in the search. I currently have posts.post_title this is the name field of the products column for searching I want to include other table and columns as ...
0
votes
0answers
12 views

Wordpress default search modification, search by Tag exactly but non-exact by Title and Description

I need to modify the basic WordPress search. I need tag searches to be exact, but searches on Title and Content to be non-exact (if that is the right term) What would be the best way of setting this ...
0
votes
0answers
29 views

WordPress shortcode with variable

I have a shortcode [wc-ps] by Woocommerce Subtitle plugin. I have to put it in search results page but it doesn't work. $post_title = esc_html( $post->post_title ); $post_title = self::...

1
2 3 4 5
33