Questions tagged [search]

The method by which users find information on your WordPress site

Filter by
Sorted by
Tagged with
0
votes
0answers
10 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
29 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
97 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
15 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
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&...
2
votes
1answer
46 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
18 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
140 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
99 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
797 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
35 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
13 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
15 views

Search by tags and categories only

I recently changed themes for my blog and somehow changing the theme interfered with my Snippets plugin for my custom search code to only search for tags and categories. What I'm trying to achieve is ...
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
36 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
31 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
0answers
17 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 ...
0
votes
1answer
17 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
36 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
0answers
50 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
0answers
51 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
80 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
0answers
33 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
39 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
25 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
15 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 ...
0
votes
0answers
54 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
57 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
82 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
297 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
0answers
35 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
307 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
262 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
30 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
158 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
17 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
17 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
37 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 ...
1
vote
1answer
449 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
43 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
38 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
59 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
70 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
33 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
127 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 ...

1 2 3
4
5
34