Questions tagged [search]

The method by which users find information on your WordPress site

Filter by
Sorted by
Tagged with
0
votes
1answer
27 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
74 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
47 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
64 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
25 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
126 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
1k 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
15 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
52 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
19 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
85 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 &...
0
votes
1answer
25 views

Hide Search Form above results

I have a search form in the navbar. This works just fine, but when results are displayed, the search form is repeated above the results. I would like to keep the search form in the navbar, but lose ...
0
votes
1answer
63 views

Content disappears when searching with Search & Filter plugin

I manage a website in which the plugin Search & Filter is being used to go through the content by visitors. With a particular search query, the content appears correctly, soon to disappear ...
0
votes
1answer
43 views

Including taxonomy in searches

(Fairly new to WordPress, but I'm a React / NodeJS developer) I have a basic search function that search a custom post_type (listings). It makes use of the standard built in get_search_query and ...
1
vote
1answer
38 views

Setting custom search engine indexing for a “dynamic WordPress page” with htaccess

I am searching for hours but didnt found the code for my requirement, Can my requirement be done with htaccess? Requirement - These urls of a page should be indexed by Google: example.com/example-...
0
votes
1answer
2k views

Woocommerce: Search by custom attribute

I have created an attribute for products which is named: code. But default wordpress search functionality doesn't search code in front end. How I can modify it in order to include code in search ?
0
votes
1answer
23 views

Replacing word in wordpress Search not working Properly

I want to replace word/character in wordpress search using the below code, though it works but not well. E.G: if i search for only var it replaces var to foo and its works properly fine. but if i ...
1
vote
1answer
52 views

Advanced search by two criteria - sort by location and date (ascending or descending)

I have spent a couple of days working on this and I am still not able to figure it out. I am trying to make advanced search filter that sorts posts from a specific category on two criteria: location (...
1
vote
2answers
56 views

How do I properly redirect outbound links with special characters

The search form on my website has a couple radio inputs for the user to select which source (all but one are external to the website) the search query should use. I retrieve those inputs (search ...
1
vote
0answers
32 views

Change WordPress search Permalink structure

Please I want to change my WordPress search permalink structure, from + as the separator to - Example: https://wordpress.stackexchange.com/search/please+help+me+out To https://wordpress....
1
vote
0answers
20 views

URL search link for 'category__and' instead of php query

I found this in the WP Docs: Display posts that are in multiple categories. This shows posts that are in both categories 2 and 6: $query = new WP_Query( array( 'category__and' => array( 2, 6 ) ) ); ...
0
votes
0answers
52 views

Replacing + sign to - in wp Search Permalink

I have really tried my best but nothing is working out, I want to replace my wp search permalink [spaces] and + to - Example: https://wordpress.stackexchange.com/search/i love you to https://...
0
votes
0answers
18 views

Modify main search form to search user too

I'm not sure if it's possible, i would like to modify the main search to allow search by user profile too... I only found solution for separate search.
0
votes
1answer
17 views

Allow WP users to sort search result on a videos site

So I have a video site based on wordpress - The search page currently shows post in date order but I want the users to have an option to sort the results by different options for example sort by views,...
1
vote
0answers
113 views

Wordpress default Search function inconsistent in WooCommerce Product Titles

I have a custom query searching by Post title keyword for WooCommerce. But some words return no results and some words do. This simple query doesn't return all words. Words that work: Dressing ...
0
votes
2answers
17 views

Limiting Wordpress Search function : Custom build

The website I am busy working on was built by another company that no longer supports Wordpress so I am looking for help. Below is the PHP for the search function. From the research Ive done it seems ...
0
votes
1answer
17 views

Search with filters

I want to create Three Filters in the search form with three different filters as (Tags, categories and posts). Is it possible to create those filters? If possible means how can I create that? ...
1
vote
1answer
60 views

Where does the Yoast SEO plugin set the Open Graph metadata?

The Yoast SEO plugin add this line to the head section of the page: <meta property="og:image" content="https://link.to.image.jpg" /> But according to FB OpenGraph og:image not pulling images (...
1
vote
1answer
322 views

search filter add priority to post_type and add order to some post_type

I don't want to change the core SEARCH function. I have default search function and only updating search.php file in the theme. I added search_filter function into functions.php. function ...
1
vote
1answer
25 views

Non-Blog Website without Search: are comments.php and search.php in theme still required?

What is the best practice when it comes to a static, minimal WP website? It will have no blog updates, no discussion/comments, and no search. Should all the standard template files still be included?
0
votes
1answer
109 views

Query first and last name from custom post type

I want to query first and last name using custom post type metaboxes. Code i am using: $name = 'John Doe'; $args = array( 'post_type' => 'customers', 'post_status' => array( '...
1
vote
1answer
72 views

How to restrict wordpress search to pages and disable products listing search?

I have a requirement where i need to restrict wordpress search to pages listing only and disable products listing . In other words i wanted to replace post type in the search url from 'products' to '...
2
votes
0answers
125 views

Make Wordpress Search for Both Main Domain and Subdomain

I have check through Stackexchange, but no topic is similar to this topic to this. Is there any way to make WordPress search work for both main site and subdomain? Both of them have two separate ...
0
votes
0answers
65 views

How to extend WP_query to a specific table?

I created a new table (named extrapage) in the wordpress database (named wpsite_db). I have added to this table some pages not published directly with wordpress and I want these pages to be considered ...
0
votes
1answer
101 views

Generate Static Page to Show Search Results/Detail for API

I'm fairly new to WordPress, but well seasoned in PHP. I've looked around for other examples, and most of the code samples I see are all about creating posts and hooking around the search results ...
0
votes
1answer
42 views

How to rewrite wordpress search to work on specific category

I want my wordpress search to work on specific category within custom search, by default this actually work fine example.com/categoryname/?s=keyword but I want to make it work like this example.com/...
3
votes
4answers
2k views

Wordpress Search - display taxonomy terms in results

I have a custom post type of Hotel. Hotels can be can be categorised with the taxonomy Resort. On my search page I need to be able to list hotels and taxonomy terms in the results, as separate ...
0
votes
1answer
26 views

Very large list of options for BuddyPress profile fields

I’m making a site with BuddyPress xprofile fields which can have up to 40000 options. I already loaded the options into the db via csv file. Now the site loads very slowly and is basically unusable. ...
0
votes
0answers
19 views

Search button click sends to single-custom_post_type instead staying at the same page

I created a template to display search results based on user selects. The problem is after I click on the search button it sends to the single-product(This is a Product custom post type). I also have ...
0
votes
1answer
74 views

Pagination Error : Duplicate argument being outputted

I've been writing a custom search.php loop for some time now and I'm running into a weird problem. My php argument is outputting some unexpected results by repeating the template file. Currently I ...
0
votes
1answer
65 views

searchform.php not included by get_search_form when using wp_dropdown_categories

I have a category dropdown within my searchform.php, coding within Wordpress 4.x. It has worked without issue for a couple of years. An issue has arisen with Wordpress 5.2. My searchform.php ...
0
votes
1answer
21 views

Editing a Search Form

I am working on a search form in my Wordpress site. It has an advance search box in which there is an Advance button, clicking which drops custom filters to include. https://ibb.co/R7DFC1F >> I want ...
0
votes
1answer
693 views

Can't find a product by SKU

I have some problem with admin panel product search. The products in some categories can't be found by SKU, only by name, while the others can. I've tried to search with SKU:, but that didn't change ...
0
votes
1answer
201 views

Remove pagination if search returns empty

I made a fix that when the searchbar is empty, it returns 'No results', instead of all posts, but the pagination still shows up. Does anyone know a fix for that? My code search.php: <div class="...
0
votes
1answer
448 views

Custom Post type doesn't appear in search results

I am working on a plugin where I am adding a custom post type and inserting its posts based on wp_insert_post function once the plugin is activated. The problem is that the custom post types cannot ...
0
votes
0answers
43 views

Modify wordpress search to search only pages and load matched page not search results

I am currently working on na project which requires a modification to wordpress search functionality. I would like to modify it in this manner to make wordpress search only page titles. to make ...
0
votes
1answer
40 views

How to avoid bypass of search bar rules?

I’m building my site locally. Since I want users to be able to write only specific terms in the search bar, I put a jQuery script in the wp-content\themes\sitename\js folder. The script works fine, ...
0
votes
1answer
27 views

Restrict WordPress search to a single ACF field

I've used the following filter to include an ACF field into my search results. add_filter( 'pre_get_posts', 'so_9224493_adjust_search_query'); function so_9224493_adjust_search_query( $query ) { ...
0
votes
0answers
211 views

search results to show individual ACF fields from inside custom posts

In need of some help. I have my search results showing the custom post type with all the ACF fields inside. What I want is the search result to show the ACF singularly with a field name of file_name ...

1
3 4
5
6 7
34