Questions tagged [search]

The method by which users find information on your WordPress site

Filter by
Sorted by
Tagged with
1
vote
1answer
305 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
23 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
31 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
347 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' => ...
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
13 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
52 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
177 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
1k 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
25 views

Creating a custom WP query for a Custom Post Type

I'm trying to create a WP query to search a Custom post type by its title. By using the following code, I get all portfolio posts: $search_query = array( 'post_type' => 'portfolio', '...
0
votes
1answer
71 views

What is the correct way to search 3 custom fields only in WordPress?

I have three custom fields (not using ACF). I want the search form to search for a match in: _cth_featured_zip_code_1 _cth_featured_zip_code_2 _cth_featured_zip_code_3 This is the query I've ...
0
votes
0answers
24 views

In the php, how can I have a category of a custom post type display?

It's for my search page on my site. I would link it but it's not up and running yet so hopefully, I can explain. I have custom post types that are then broken out into categories. I want, when ...
0
votes
0answers
34 views

Search Function not searching correct custom_post_type even though post_type is defined in search args

I have a custom post type of job_listing and a custom_post_type of job_application. Each job_application post has a parent within the job_listing post_type So if a job listing for an Office ...
0
votes
1answer
28 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 ?
0
votes
1answer
40 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://...
1
vote
2answers
176 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 ...
0
votes
1answer
46 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
3answers
26 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
96 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 ...
1
vote
1answer
65 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 ...
1
vote
0answers
13 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
135 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
56 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
1answer
581 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
2answers
479 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 ...
2
votes
0answers
38 views

Automatically adding category filter based on search string

Like ebay and amazon, i want to implement something on my site wherby if someone searches e.g red dresses then the category "Women's dresses" is only searched within. As seen as below, a generic ...
2
votes
1answer
325 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
vote
1answer
18 views

Search for categories

I would like to propose on my site a search engine allowing to find categories (with suggestions), and not posts or pages. I tried different plugins, including ajax search lite, but without success, ...
0
votes
1answer
22 views

Wordpress search with more input fields?

I have this example of working search: <form action="<?php echo esc_url(site_url('/')) ; ?>" method="get"> <input type="search" name"s"> <input type="submit" value="search"&...
0
votes
1answer
17 views

Altering search results to handle a post meta field not working in current WordPress

I have the following code (based on examples from various other places on the web) It's definitely updating the query but it just doesn't return any results. Am I using the wrong hook ? function ...
2
votes
1answer
40 views

How to change users smart quotes to dumb quotes in search bar?

I have a problem where smart quotes (curly) will not return any search results but dumb quotes (straight) will give what I expect. I would like to give all users the same experience so I need to ...
2
votes
1answer
966 views

Search not working with title and content

I am working on search. I am able to search post by tag and category but not able to search by title and content. I tried below code but it's not working. Would you help me out? $getSearch = ...
1
vote
2answers
46 views

Search the product by tag or category not working

I am working on search. I am trying to search the product by tag or category. I tried below code but it's not working. I am getting Nothing Found Also title and content is also not working. ...
2
votes
1answer
92 views

Making a list of post tags in string

I am trying to push post tags to the search index of the WPFTS plugin in order to search my posts by tag names. To achieve this, I have to generate a string with all tags. Here is what I tried: ...
0
votes
0answers
79 views

Wordpress REST API Search decoded URL with cyrillyc symbols

I'm trying to use REST API search opportunity with string: https://example.com/wp-json/wp/v2/posts?search=searchquerry, but it doesn't works with decoded url and cyrillyc symbols. For example, if I ...
1
vote
1answer
151 views

Wordpress isn't reflecting changes I make to a specific file via FTP [closed]

Hello, I'm new to Wordpress so please let me know if there's any vital information I've left out. I've just migrated from my localhost to online: there were a few bumps but after fixing some paths ...
2
votes
1answer
35 views

How to avoid the specific page while searching in WordPress without plugin?

I am using WordPress search which is working but I am getting one issue on the search result. My issue is, when I search my product then I am getting the output but it also displaying the privacy ...
2
votes
1answer
155 views

Block search SQL from happening

I need to block some accesses to search results not the whole page, just the results. The problem is, I need the search SQL query to not happen AT ALL. (I can conditionaly hide the output loop ...
0
votes
1answer
28 views

Search issue on special Character

I have imported posts from RSS Feed and then on word press default search if i search Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum – Lorem Ipsum Lorem Ipsum Lorem Ipsum It shows me ...
1
vote
0answers
13 views

Getting to a specific page on website using specific code instead of navigation bar

Is there a way get to a specific page on a WordPress website by entering in a code instead of going through the navig
0
votes
1answer
110 views

Create a shortcode for native WooCommerce search form [closed]

How can I create a shortcode for the native WooCommerce search form, so that it can be used elsewhere? In the secondary menu, for example.
0
votes
1answer
48 views

Search only one custom post type

I've been reading several different articles/posts to see if it could help me with my problem, but no luck so far. My goal is to make a custom search for a custom post type: restaurants. When I'm ...
0
votes
1answer
105 views

search based on custom field

My question is, is there a way to configure wordpress' search to, within a custom post type, search for a custom field value. //------------html code--------------------// <input type="text" name="...
1
vote
0answers
26 views

Change Search url slug for each site in a multisite network

As per the title, how would you change the search url for different sites in a multisite network. eg: testsite.co.uk/search testsite.de/suchen testsite.fr/recherche I can change the search term for ...
0
votes
0answers
200 views

Wordpress search not able to find the category

I have 3 to 4 categories on my website. I am using WordPress search but when I am searching my category then I am getting Nothing Found also, I tried to search the subcategory then also I am ...
0
votes
1answer
2k views

How to search through “post title” and “tags” using WP_Query?

In my custom search form, i'm currently using these kind of $args with my WP Query: $args = array( 'post_type' => 'post', 'posts_per_page' => $postsPerPage, 'offset' =&...
0
votes
1answer
22 views

How to create custom search form function including post “tags”

This is my HTML: <input type="text" class="keyword" name="keyword" id="keyword" placeholder="Search video..."> <button id="search-keyword">Search</button> When I click the "Search" ...
0
votes
1answer
60 views

How to search in Elastic by post title/concerpt/content?

Im trying to make Wordpress to search in Elastic by some restriction: $args['ep_integrate'] = true; add_action( 'pre_get_posts', function( $query ) { // what to write here to search in "title", "...
0
votes
1answer
21 views

Wordpress Search by tags

How can I set by using functions.php, Wordpress search that the searching be only by tags.
0
votes
1answer
121 views

WP_List_Table Inside Metabox Not Working on Clicking Search Button

I'm trying to display a WP_List_table inside a metabox. The metabox is for listing registered users to a course(LifterLMS Course Post Type). The table columns contain user_id, user_name, percentage &...

1
3 4
5
6 7
35