Questions tagged [search]

The method by which users find information on your WordPress site

Filter by
Sorted by
Tagged with
-1
votes
0answers
6 views

How can I do metabox filtering?

I have a post type. I have a private domain within this post type. My special area is a date. I want to filter by post type and end date. How can I do that? Thank you in advance for your help.
0
votes
1answer
4 views

Redirect to a page while maintaining search query parameters without causing an infinite loop

We are making use of a plugin called Product Filter by XforWoocommerce. It has a feature that limits the available product filter options based on what products are visible, however, it does not work ...
0
votes
0answers
21 views

pop up ads keep showing in my wordpress site [closed]

I have this problem with my WordPress site since I joined google search engine (Idk if that was the cause or not ) Before, it was only a problem with going to my site with google, But now the problem ...
0
votes
0answers
8 views

Elementor Empty Query Customization [closed]

I want to Customize the Archive page when the Search Query Doesn't match any entry At the moment, Elementor only offers a text to show when the search query is empty. but I want to have an image and ...
0
votes
1answer
11 views

make link to search page

I have a search Icon in menu section of my site and looking for a way to when a user click on this search icon, redirected to the search page. in the search page, there is a search form and also ...
0
votes
0answers
26 views

WP_Query no result if keyword contains number

$args = [ 's' => $autocompleteTerm, 'orderby' => 'modified', 'fields' => 'all', 'post_status' => array('publish','future'), ]; $posts_query = new \...
0
votes
0answers
14 views

How to search media library alt text and title fields

I need to be able to search in the WordPress media library alt text and title fields. I've previously used a plugin called Media search Enhanced by 1fixdotio (https://wordpress.org/plugins/media-...
0
votes
0answers
7 views

How can I create zip code search filter to link to specific agent(s) on same page?

I have a page on my site (https://eliterenetwork.com/member-roster/) that has a list of agents that are categorized by states they do business in. I'd like to create a search filter at the top of the ...
0
votes
0answers
26 views

Optimize WP search query term

I made the following filter to remove s from terms shirts or hoodies, however I don't think it's the way it should be. Any ideas if I can make it in a more proper way? add_filter('posts_where',...
0
votes
0answers
30 views

Tweak the WP Query search

I am having a hard time trying to find a way to tweak the search option on my wordpress website. For example: I have products with the word electronic and monitor in the title, however when people ...
0
votes
0answers
4 views

using url parameters for a search, but for custom post_type the date is missing from results. I checked the index.php and search.php

I am using search url parameters for a search, "www.gigs.com/?s=piano&post_type=post" and it works - but if I use a custom post type "www.gigs.com/?s=piano&post_type=xdays1&...
0
votes
0answers
13 views

How to close expanding search bar on scroll or click anywhere

I have customized the woocommerce search form using an expanding search bar tutorial. At the moment it opens and closes on click of the magnifying glass icon. Instead, I would like it to close when ...
0
votes
1answer
9 views

Cannot make custom search permalink to work in a fully custom theme. Search string $_GET['s'] is always empty

I am learning to build a fully custom WordPress theme. I have a search form <form role="search" method="get" class="search-form" action="<?php echo home_url() ?...
0
votes
0answers
25 views

Add pagination to custom search

So I took over a site, and the problem being that I would like to add the pagination to the custom search made by the former developers. I have a little trouble to find my way around and I would have ...
0
votes
1answer
14 views

Search results thumbnails different size

Seems that according to the nature of my theme, whenever I do a search query and a result from my Projects section appears, the pictures appear huge and even break the footer! Whereas if I do a search ...
1
vote
1answer
66 views
+50

Can't search posts using WP_QUERY inside AJAX Function

WP_Query is used to get posts via simple arguments provided by it. WordPress provides an argument called 's' for search. It basically searches content of all posts and lists the ones with that string ...
0
votes
0answers
8 views

can't get url parameters working with metadata for searching posts

I am trying to get a custom feild added as a search paramter url. my post metadata for this example is 'public_paywall' and want to register as it as a query var "access" This is the code I ...
0
votes
1answer
25 views

How to Fix Form elements do not have associated labels in Wordpress Search Form (without button)

Is there any way to fix the "Form elements do not have associated labels" issue in WordPress search form without having the search button. Google Light House Audit: Form elements do not ...
0
votes
0answers
33 views

How to add WooCommerce SKU to search query?

I have issue adding the meta_value in search query for the WooCommerce SKU. By default, the search by SKU only work on the admin. I would like to make the frontend search accepting SKU in search. Note ...
0
votes
0answers
10 views

How to make WordPress search more flexible?

My customer has a WooCommerce product catalog that uses a number of different naming conventions. A part commonly referred to as D100 could actually be named D100, D100-BLACK, D100BLACK, D100 BLACK, ...
0
votes
1answer
10 views

edit URL of search result

i have wordpress website with sailent theme i have default search in header the result of search is http://www.example.com/?s=colagen while "colagen" is the key that type it in search but ...
0
votes
1answer
18 views

search custom post type by custom fields on front end

I want to add filter to my site and want to filter custom post type by custom fields for example i have a custom field with name country when a visitor enter a country it should show all custom post ...
0
votes
0answers
11 views

Filter search results by post_tag if exist

I want to get posts from search results using post_tag. for example If a user input in the search form "party". First, we search if "party" exists in post_tag and show all posts ...
0
votes
0answers
10 views

How to get search result as image rather than page

so I'm making a meme template(image) website . But when i try to search a template the search result show the page it is in rather than actually showing the template(image). What can i so do to show ...
0
votes
0answers
14 views

Woocommerce Search perform “like” query

I have a search box on woocommerce site and it seems to only find products if the searcher enters the keyword exactly so if they search for Kola bottles it will not find it as the title is "cola ...
0
votes
0answers
26 views

Multiple WP_Query args combinations according to post type

I'd like to have separate meta_query arguments according to the post type. For example, I'd like to query t-shirts that have a green collar or dress-shirts that have a green inner-lining, right now I ...
0
votes
0answers
5 views

Some terms on the search box of Woocomerce redirects to wp-admin

I bought the Shopinia theme by Themeforest last month. I'd like to ensure that the problem isn't related to the theme. When I try to search x terms on the search box of my webpage (https://...
0
votes
0answers
23 views

change the url of search result

I want to change the URL of the search result. My search result is www.exemple.com/?s=col. The col is the text that types it in the search bar but the product layout result looks ugly. I want the ...
0
votes
0answers
9 views

No Results in WooCommerce Product Search

When I try to create a grouped product, I type the field which searches for products but I am getting no results even though I should. After looking at the request made from the API with this URL: ...
1
vote
4answers
61 views

Custom search results page query, link permalink to post title while separating by post types

I am using Option 3 from this answer as my source. So far it is working great, it is splitting my search results by post type and listing the posts from each post type in their own sections. The only ...
0
votes
0answers
6 views

Woocomerce search box redirects to wp-admin with some terms

Well, I can't tell much about this problem, but for some reason, when I search on my website some terms or at some times, the search redirects to wp-admin. What can be the reason for this?
0
votes
0answers
14 views

Creating custom post type for Authors in Woocommerce

I'm trying to integrate the ability to search for Author profiles with the JetSearch plugin. Currently it does not allow for users to search for/by Authors. However, it has the ability to search by ...
0
votes
0answers
19 views

Adding WordPress Tags to the searched fields in customized search query

I have a website where I need to be able to search for Posts based on title, tags, and content of custom fields. I've made the modifications below to my functions.php file. (Code for including the ...
0
votes
0answers
12 views

Categories In English version showing not canonical URL, instead shows query search result

I have a multilingual site (WPML), it has Hebrew and English languages. But for some reason in English version categories showing as query string instead of just pass it through URL. What issue can ...
-1
votes
1answer
35 views

Multi-step, live updating search

I'm creating a website and want to set up a multi-step (live) filter for searching companies, industries etc and now I'm starting to explain... I have 3 categories. First category has 5 criterias. ...
0
votes
0answers
15 views

Search Results Counts by Post Category on my Elementor Archive Page

I want this type of search Results Couns functionality. First, visit this https://techpoint.org/tech-directory/ and http://prntscr.com/trbmox, then you got an idea of what I want. My website link is ...
0
votes
2answers
18 views

Find count of WordPress users by role and search string for user name

I want to get the total number of results after searching WordPress users by role and a string that matches the user name. What I tried so far: $args= array('echo'=>false, 'role' => 'author', '...
0
votes
0answers
24 views

Search within the current page

I'm trying to place a second search bar, along with the main navigation search bar, on a specific page within a site so that I can search just within that page. Per the recommendation of someone, I ...
0
votes
0answers
15 views

Search media with javascript

For testing purposed I want to search through the media of the featured image. But I can't seem to activate the search. From the admin product detail page I now have: // open featured image document....
0
votes
1answer
8 views

Is it possible to show sort page excerpt in search.php

Current I have my search just return the title of the page that has the result, is there a way to show an excerpt This is what i have <?php get_header(); ?> <section class="page-wrap&...
0
votes
0answers
23 views

Search results to point to specific section?

Is there a way for wordpress search results to land to a specific section when using elementor or any page builders on a page or post containing the matched keyword instead of returning just the page ...
1
vote
0answers
22 views

Search bar in table in wordpress

I used this code in the table plugin. It checks data through only one column, I want the code to use all columns. const searchFun = () => { let filter = document.getElementById('myInput').value....
0
votes
1answer
29 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
0answers
20 views

How to name custom search page PHP file?

I'm reading about how to create a custom search page. It's not clear for me how to proceed, in the wordpress documentation I've read that I can't use the name search.php for a search page because it's ...
0
votes
1answer
27 views

Change the text “search result for” on search result page

I've been searching thru all WordPress files for the phrase "search result for", which is displayed on the search result page (search result for (keywords)) but can't find it. I would like ...
1
vote
2answers
36 views

Search functionality - include date, category and author search

When you use the default WordPress search functionality you can only search on Title, so if you type in the title than the posts you search for will appear in the results. I would like to expand this ...
1
vote
1answer
43 views

How to get an array of years from all of the search results, and use it to filter by year the paginated loop?

I hope this is not too dumb: even though I'm learning at an acceptable rate, my WP knowledge still has some important gaps. What do I have: My search.php template gets its results from the normal ...
0
votes
1answer
17 views

Conditional to determine if search.php page is the current template

I have a specific CSS-file for my search results, so the search.php template. I want a PHP if-condition to determine if the current template is the search.php template, so that I can load that CSS-...
0
votes
1answer
21 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 ...
1
vote
1answer
19 views

Custom search results page not working with empty search

I have a custom search results page that works fine except when an empty input box is submitted. When an empty input box is submitted, the header on the results page displays "XX results found&...

1
2 3 4 5
34