Questions tagged [search]

The method by which users find information on your WordPress site

Filter by
Sorted by
Tagged with
0
votes
0answers
35 views

Search Results not displaying for multiple words ( more than 2 words) search

Searching for a single word works as expected. Searching for multiple words that should have returned results shows blank results. Manually changing the "+" character in the URL to "-" displays the ...
0
votes
0answers
28 views

Customize Search Results Body Content

Is there a way to customize the search results page to show the original text formatting in the post_text_inner class as its seen on the original post or portfolio page instead of showing everything ...
-1
votes
1answer
34 views

Different search results with Wordpress and Relevanssi

I am new here in the forum and in the WordPress world and need help with following problem. It's about a website that is using WordPress and several plugins like Avada, Fusion Builder, Fusion Slider ...
1
vote
1answer
116 views

How do I search WordPress by different fields without a plugin?

I'm building my own WordPress theme, and I would like for my search queries to search posts by keywords in the title, categories, tags, and content. As of now, I believe that my theme is only ...
-1
votes
1answer
174 views

How do I find a shortcode stored in wordpress?

I need to find a shortcode - [shortcodename] - in WordPress. How do I do that? There doesn't seem to be a search option, which seems a bit ridiculous for a editing tool. Thank you.
0
votes
0answers
21 views

Search form filtering on default language

I'm building a bilingual website ( arabic and english ) I'm using a plugin called search and filter that gives me the possibility to filter by category,post date..etc I've an issue when I switch ...
0
votes
2answers
57 views

Search redirects to index

I am tying to use the standard WordPress search, but when I attempted to search I am taking to an index instead of the search results. The search url seems correct: https://example.com/blog/?s=...
0
votes
0answers
65 views

Customize an ElasticSearch Query (Jetpack Search) to include custom taxonomy

I am using Jetpack Search as an economical way to get the power of ElasticSearch for my company's Woocommerce site. It seems that the search query is only being compared to a few select fields (...
1
vote
0answers
55 views

Admin Backend - Search Pages only by title

I want to modify the pages search in the Admin Backend, so that the search only factor the title of the pages and not the whole text/article. I already found a code for functions.php that works ...
0
votes
0answers
33 views

Search page url rewrite gives 404

I do change the search url by using the code below, When I search general terms it works well. function change_search_url() { if ( is_search() && ! empty( $_GET['s'] ) ) { ...
0
votes
0answers
68 views

How do I modify the Divi 'search' module to search Woocommerce products not pages and posts?

I need to be able to search for Woocommerce products using the Divi Search module. I've been trying to adapt the following code below to work, I think the class is .et_pb_searchform, but I'm not 100% ...
0
votes
1answer
35 views

Exclude posts with specific metadata from search?

I have created this searchfunction that looks like this: function search_data_fetch() { $search_query = new WP_Query( array( 'posts_per_page' => -1, 's' => esc_attr( $_POST['keyword'] ), '...
1
vote
1answer
112 views

Custom SQL query on wp_users with the addition of wp_usermeta

I am trying to query a list of user id's in WordPress using SQL IN() with the addition of them having a meta_value value of "Yes" on the meta_key "is_registered" in the wp_usermeta table but I can't ...
0
votes
0answers
28 views

WordPress User Search Based on Latitude and Longitude

I am working on a project for myself whereby I am trying to search users within the WordPress database based on postcode/zip and radius but the code which I'm using takes forever to load and results ...
0
votes
0answers
22 views

Infinite Scroll Post Showing out of sequence and wrapper

Just testing my search results page and saw some weird behavior here https://gnarlington.net/?post_type=photographs&s=san+francisco The last post that loads in from jetpack's infinite scroll ...
1
vote
1answer
126 views

How do I add custom fields data to a search index?

I need to make my listing data searchable: Specifically for Course Provider and Instructor. I haven't used meta queries before, anyone know where I can start? This is my current search form: Form:...
0
votes
0answers
125 views

ElasticPress Indexing multiple sites

I am using ElasticPress for WordPress and have setup to index multiple separate WordPress sites to a single index (details here) This has worked and a search on the main site example.com/ does ...
0
votes
1answer
73 views

post_type incorrect for custom post type

I am trying to display a different template depending on the post type. I have registered two custom post types called resource and contact. When I try to get the post type in search.php (using ...
0
votes
1answer
35 views

Live search by custom tag

Live search: $the_query = new WP_Query( array( 's' => esc_attr( $_POST['keyword'] ), 'post_type' => 'custom_type', 'sentence' => 'true' )); if( $the_query->have_posts() ) : while( $...
0
votes
0answers
26 views

Modify WordPress search behaviour in backend?

Is it somehow possible in WordPress to modify the default search in backend? At the moment I can only search when I start with the beginning of the search term. But I want to search with the second ...
0
votes
0answers
41 views

Have wp search find results with 's

With the basic wp search, it trips on posts with an 's in the title. Example: The post is called Benny's Farmhouse If you search for Benny, you get the result, as expected. But if you search for ...
0
votes
0answers
34 views

How to add Search URL parameters to a Page Template Page for Custom Post Type

Scenario: I have a custom post type "book" which the archives are displayed in a page "book-list" using custom page template. Currently, index.php?post_type=book gets redirected to this /book-list/ ...
0
votes
0answers
31 views

Add a custom search result to the default WordPress search results for a specific term or terms

It appears that the default WordPress search returns posts that contain the search term(s) within the post's meta values. I would like to inject new search results -- ones that aren't tied to a ...
0
votes
1answer
27 views

search customers in front end by billing data

i have got this code , but i can´t search by billing_phone <form role="search" method="get" id="searchform" class="searchform" action="<?php echo site_url('/'); ?>"> <div class="...
0
votes
2answers
89 views

Searching a custom WP table and displaying results in an HTML table

I have a custom table in the WP database called wp_products. It has columns titled ID, SKU, Details and Page. I'm trying to search this table via the default search box, so I've replaced my search.php ...
0
votes
1answer
159 views

How to add search box to table results in admin page [closed]

I have a custom database that i succesfully brought into my plugin submenu page and it displays the results great. If you manually add a row to the DB with phpmyadmin it shows that result on a refresh....
0
votes
1answer
39 views

Issues with search after added meta_query

I'm trying to add to the WP search so it includes some meta fields. Here's my current code in the functions.php which was based of another stack from a few years back: function extend_search_query($...
1
vote
1answer
29 views

Transliterating search term in another language

I've been searching everywhere in order to find a way to transliterate a search term before initiating the search in a different language - greek in particular. So I would expect a term written in ...
0
votes
0answers
50 views

Load Search Results in Div

I would like to have my search results load into a div that could appear across all pages of my site, rather than into a completely separate page labeled "Search Results". I have reviewed a similar ...
0
votes
0answers
34 views

How can I do a search query on on the url from the WordPress JSON API to filter by a subfield?

I have a response consisting of many fields, I customized my endpoint to retrieve the tag_list array that contains details about all the tags associated with a post, including the name, like this: ...
0
votes
1answer
717 views

Notice: Trying to get property of non-object in

hope someone of you can help me. On my wordpress-page, i get the following messages, when I use the search function and there are no results: Notice: Trying to get property of non-object in /var/www/...
0
votes
0answers
94 views

Native admin table with search functionality: sorting by columns does not work

I display a WP_List_Table on a submenu_page and offer a search function, which works. However, if I sort by a column within a search result, all records are displayed again. I really don't know why ...
0
votes
2answers
28 views

Hi everybody, I have a problem of search box

I just finished my site with the theme "shopper" on wordpress with the woocommerce extension. There is a search bar in the header that I can not remove. this bar offers in English to search in ...
1
vote
0answers
39 views

How to sort by columns within a search result without displaying all rows again after sorting

I want to display a WP_List_Table on a submenu_page and offer a search function. The display of the data works so far and also the search, but the column sorting causes problems. If I click on the ...
1
vote
0answers
18 views

Rewrite: WordPress URL rewrite on Search

I am trying to create a URL rewrite in wordpress. I am creating a search from through wordpress. The URL structure I currently have is the following: http://localhost:8888/?post_type=CustomPost&s=...
1
vote
1answer
215 views

Edit css for search results page

I have a search results page with a template call content-search.php. Basically what this file does is to display the results after a person searches something on the search bar, and i would like to ...
0
votes
2answers
306 views

Re-order search results with posts_orderby filter and post meta value

I'd like to re-order the search results based on post meta and date . The post meta key is _prioritize_s and the value isn't important. So in a "normal" meta query, I'd just write the compare ...
0
votes
0answers
31 views

search and filter with custom post type and custom fields

I want to put a filter system in my website that contain a search input and list of states, if I choose a state without writing in input it'll give me all posts in that state and if I search for ...
0
votes
1answer
58 views

Display Search Results by tag_ID in my search.php

I have my search.php working fine. But I'd like to display the search results in my search.php filtered by tag_ID when is coming from another search form. I've tried several things like: wp_parse_str, ...
0
votes
0answers
89 views

Removing &submit=Search from search parameters?

I added the search feature to my site using: <?php get_search_form(); ?> I notice on the search page, after ?s=value, there is also &submit=Search Is there a way to remove this through ...
0
votes
0answers
11 views

get searched results in different languages

I have a contact form on my site. The next code <form role="search" method="get" id="searchform" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>"> doesn't allow me to ...
0
votes
0answers
17 views

create to search column

i m create to custom post type shortcode but at the last i m trying to add Individual column searching in my table but i can't access.. this is my post_type_shortcode.php <?php function ...
-1
votes
1answer
47 views

How To Change Url Doing Some Changes in Search Form

How can url show like i want or prefix text in search query form class="search" action="/search"> input type="hidden" name="type" value="product" /> input type="text" placeholder="Search ...
0
votes
1answer
58 views

Admin: WooCommerce Navigation Menus do not show empty categories search tab

I have been searching and finally found a question that answers my question: How to show empty category in admin menus search https://core.trac.wordpress.org/ticket/45298 How could this be ...
0
votes
1answer
41 views

Search Results No Link

The search results page is not showing a link that the user can click on. I am needing the heading to be the link. Does anyone know what the issue might be? Below is my search.php and content.php ...
0
votes
0answers
14 views

increase performance in search for wp query with meta query

Currently the user can search for: Type, Make, Mileage [Min, Max] and color. He can search only one, or more than one, or all, as he prefers. I started developing for WP a short time ago, the code I ...
0
votes
0answers
56 views

How to Integrate Live search in WordPress?

I tried most of the available plugins to integrate Live Search in WordPress, but all of them messed up my theme layout. The search function in my site is from a small search box at the top right ...
0
votes
1answer
34 views

Accounting for search terms that may include a space, using SearchWP

As the title suggest I am having an issue with setting up the plugin SearchWP to correctly work with search terms (product names) that may, or may not, contain spaces. e.g. "ABC1" or "ABC 1". I am ...
1
vote
1answer
71 views

Including metaboxes from custom post types in global search — continued

I've seen several questions about including the content of meta-fields in a wordpress search. My question is not a duplicate of these. Background The issue I'm having stems from how meta queries ...
1
vote
1answer
526 views

Custom post type not showing in search result

I have a custom post type that I would like to be searchable (I use the relevanssi search plugin). I have the following code to add the custom post type: add_action('init', 'eyewebz_create_post_types'...