People who code: we want your input. Take the Survey

Questions tagged [search]

The method by which users find information on your WordPress site

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

Custom search for whole site to include a single meta key apart from post content and title

I have a plugin, in which i need to override the wp search, so that it includes the meta key '_tl_key' value in the search. Suppose i have a page with the meta key value "hello this is me",...
0
votes
0answers
15 views

WP search box on page not finding .PDF files

Current marketing person left the business and I'm filling the role for now. Receiving code from search page which formally was able to locate .PDF files by typing in and searching by key word(s.) The ...
0
votes
1answer
16 views

Bots using internal wordpress search

My stats show that a lot of bots are abusing the internal wordpress search functionality of my site: www.yinlingjiaoyu.cn 9 www.scckym.cn 9 www.gzcq1688.cn 9 www.mindswift.cn 8 www.ytgso.cn 8 www....
0
votes
1answer
34 views

find custom post type post by searching its custom field with my string

I have a custom post type called series and each post has a custom field named originaltitle. So in my code before I create a new post, I need to check if there is already a "series" with ...
0
votes
1answer
23 views

Add rewrite rule for archive search

I want to searchable archives like following: Default Search: /search/{keyword} -> search.php -> get_template_part('archive-default-search'); Default Custom Archive: /support -> archive-...
1
vote
0answers
31 views

Redirect template based on permalink rather than $wp_query

I'm trying to separate out different templates which utilise WordPress' search (s query var) along with different post types. Situation 1: Default WordPress search page (search.php). Example: example....
1
vote
1answer
32 views

Wordpress, fetching users with an exact match in a string of comma separated values in user_meta

I have data saved in user_meta -> areapref field. It is basically a string of comma delimited post IDs (e.g. 2, 37, 200, 300 etc.) I need to check if the user has a particular ID in this field. If ...
0
votes
1answer
17 views

Adding ELSE argument to AJAX Live Search for “No results found”

Having finally being able to make an AJAX driven live search functional, I need help understanding how to add an else argument function so that when there are no posts matching the search query, the ...
1
vote
0answers
20 views

How to use wp_query to post count by search term > group post count by date > convert to json. (ex. result 12-21-2020 - 343)

Im trying to create a graph that displays count of post per day and display it on the search result page. Search Example. User searches with the search term "football". The search result ...
0
votes
0answers
11 views

Add a functionality to quickly filter custom posts in Admin Area

I am creating a website for a doggie rescue, basically configuring the backend so they can manage dogs, volunteers, etc. The legacy system had a feature where the user could start typing into an input ...
3
votes
1answer
56 views

searching in custom meta field

I have multiples custom field in a post type. i can save data, update and display, all fine. now I'm doing the search engine. as it is a library, it must be possible to search in specific fields (...
0
votes
0answers
9 views

Need Help With Search Forms!

hi All how to create like this search form in wordpress?
0
votes
1answer
52 views

Changing the ORDER BY in WordPress default search function

My client's website has a blog category and many product categories. She would like the search results to include the blog posts, but have the product posts first. I can see two major implementation ...
0
votes
0answers
23 views

How can i find wrong word in search box and replace with correct word

I have a search form and Many site users search for the wrong words, I want to replace these wrong words with the right ones so that users can get results faster. I have been searching for this for ...
1
vote
0answers
28 views

Get most searched keywords in WordPress

Normally, visitors of a website search for random keywords. Some keywords searched by many people. Is it possible to get a list of keywords along with the number of search volumes that are searched by ...
0
votes
0answers
17 views

Autocomplete for WordPress search?

I'm trying to make and autocomplete-function for the native WordPress search, like on Amazon.com: The frontend of the site is a bunch of Vue-components, so making an AJAX-request to get the ...
0
votes
0answers
15 views

How to search multiple terms of custom taxonomy?

I have some custom post types and taxonomies in my theme. To include terms of these taxonomies in search results, I'm using this script: function atom_search_where($where){ global $wpdb; if (...
0
votes
0answers
16 views

Get more accurate results searching with 2 fields

I have a text field and a select menu. If I choose only from the select menu it shows me all those results as expected. However, if I enter a name in the text field and choose a location from the ...
1
vote
0answers
39 views

Wordpress sort search results by custom order

I want to search "sandwich" I have pages as "sandwich", sandwich-toast, sandwich-three-layer, sandwich-simple posts as "sandwich-recipe", "sandwich-maker-links",...
1
vote
0answers
25 views

Multiple Search Terms WP_Query

I've tried searching to no avail, and it may be that I'm not sure what it is I'm actually searching for. I am trying to use the WP_Query to display a list of posts that contain ANY (not ALL) of the ...
0
votes
0answers
15 views

Search results with pagination not working

I've got a news page with a search bar functionality. On this page I want a user to be able to enter a term and the contents of that page will be updated depending on what the user has entered. I don'...
0
votes
0answers
29 views

How to include shortcodes and pdfs in WordPress search without plugin?

I have a WordPress website using Avada theme. The website uses an inbuilt WordPress search tool which searches only posts. The website uses shortcode to add toggle/ accordion etc. I want to include ...
0
votes
0answers
30 views

Pagination repeating posts on search results

i have a problem with my wordpress search result pagination. Basically it's working as intended until i hit page 2, it then repeats the results of page one. Here is my search.php, please excuse the ...
0
votes
1answer
18 views

I have problems with the search query using multiple post types

Hi i have created a custom search with the following query. But the query is not working when i add multiple values to the post_type filed, the search is not giving me any results? did you have the ...
0
votes
1answer
13 views

Call product search from custom hook

I am trying to make search request from my custom form. For this I have an AJAX call on form submit: jQuery("#header-search").on('submit', function () { jQuery.ajax({ url:...
0
votes
0answers
20 views

How to display multisite search results for sidebar and search.php at the same time without slowing the search results?

I have a page which searches for the whole multisite (it's like google for my multisites). It's working alright but it takes a while to load (depends on what term you use, it can take 2-3sec). The ...
0
votes
0answers
14 views

content-search.php duplicating the output for a certain post type

So some odd reason my results page is fine with my custom post types, but for the default post type, it is duplicating/closing the <a> and creating the below output. The output should only be 1 &...
0
votes
0answers
14 views

How to make search work with front-page.php?

In the file header.php I have a search form that sends me to URLs like localhost/?q=... but, since I have a front-page.php file, it does not work although in the WP theme I have a file called search....
0
votes
0answers
23 views

Can I replace the search bar with Programmable Search by Google?

I have the Savia theme which is no longer being supported by the developer. The search bar shows up on the top right-hand corner of the page, so I was thinking of adding the script Google provides ...
0
votes
0answers
16 views

Search results based on user role

I have a membership site with 1500 people. I have 4 different roles and several pages or posts of content that should not be open to everyone. I would like to set search results based on the pages or ...
1
vote
0answers
13 views

Site search needs to find posts for category topic AND Tag or keyword thats not in the post

So I have about 20 categories on the site, one of them is Press Releases. I've been asked to make sure that posts in the press release category only show up in that single category BUT can can also be ...
0
votes
1answer
30 views

Search doesn't return anything

search bar on skorpion.info.pl doesn't return anything - it sends you to a page "skorpion.info.pl/undefined". I tried working on that, but couldn't fix it in any way. The search is run by ...
0
votes
0answers
72 views

Adding Search & Filter to custom WP_Query?

I'm using Search & Filter Pro, and want to add it to my currently setup WP_Query: if( get_sub_field('type_of_post') == 'age' ) { $post_type = 'courses'; $taxonomy = 'ages'; $term = ...
0
votes
0answers
9 views

filterable Search from specific database tables

I have a WordPress website and I created custom database tables using Participants Database Plugin to store my data in my database now I want to add a filterable search that only search from those ...
0
votes
0answers
43 views

How to display only the parent owner of an attachment pdf file (using AC and ElasticPress)

I have a CPT (using ACF fields), that have a title, some other taxonomies, and a pdf attached file (it's also an attachment file because I need that Elasticpress search in it). When I do a search, ...
0
votes
1answer
15 views

some one help . search not jump to search page

i have form search : <form action="<?php echo esc_url( home_url( '/' ) ); ?>" method="GET" role="form" class="searchform"> <div class=&...
0
votes
0answers
24 views

Customize search bar

I am new to wordpress and have no experience at all with coding. So hopefully you can help me. What have I done: I have a wordpress website with the ASTRA child theme with elementor. Now I made a ...
0
votes
0answers
10 views

Changing Search Page Result URL

I want to change my search result page from: mywebsite.com/s=query to mywebsite.com/s=query&post_type=product. I have no clue how to do this though... could anyone kindly help? I'm not a coder and ...
1
vote
1answer
11 views

Search in custom post type AND in pages with category

I have a search field that's searching in my custom post type bwps with a hidden input: <form class="search-form form-inline" action="<?php echo site_url('/'); ?>" method=&...
0
votes
0answers
39 views

Banning special characters in search form input

Apologies if this is a duplicate posting, I've searched extensively and cannot find either this question or a solution, or even to know if this is really a problem. I find a LOT of search queries ...
1
vote
1answer
570 views

Change Navigation Bar based on logged in or not

I am using the BuddyBoss theme (BB child theme active) and need to control which menu appears based on whether the user is logged in or logged out. Logged out are granted access to a few URIs but most ...
1
vote
1answer
50 views

Change default search URL slug in wordpress with Custop Post Type as Search target

I want to change default search page URL from: http://example.com/?s=background&post_type=download to: http://example.com/photos/background/ I tried to change the below function for the default ...
0
votes
0answers
32 views

Wordpress Admin Post Search extend to one custom field

I would like to extend the WordPress admin post search (so in back-end) in order to look at keywords in post title but also in one custom field. I find this thread interesseting (except the custom ...
0
votes
0answers
14 views

I would like to add &bp_search to the end of every search query

I would like for my site to append "&bp_search" to the end of every search query performed so that it displays the search in a more favorable way on my site. I can't seem to figure out ...
0
votes
0answers
30 views

WordPress search - Display the paragraph which has the searched word/term

First of all I use Timber (TWIG) with WordPress. That's why there are some differences with only the use of PHP. I implemented the WordPress search function with a searched word highlighting system (...
0
votes
0answers
20 views

Custom search bar - search in a specific category/tag field

I want improve on my website some search bars for search a specific post in only one category or tag. For example i have a page with 200 posts, eachone have one or more tags/catgeories: tag "x&...
0
votes
1answer
101 views

Search function - problem with whole words

First of all, I use Timber (TWIG) with WordPress. I created a search query in Ajax. Everything works fine but the results do not suit me. Sometimes the results show me part of the words Example : if I ...
0
votes
0answers
19 views

Replacing wordpress database search with Elasticsearch using a bought theme

I have bought a jobboard theme ( https://wp.nootheme.com/jobmonster/ ) so as to create a jobboard. The theme is using the wordpress database search,when searching for a job. My question is:Is this ...
0
votes
1answer
26 views

Create a post automatically if search result has zero results

I'm developing a site where people can search phone number(s), the most complex part is that i want to create a post automatically when someone search for a specific number if that phone number yield ...
0
votes
0answers
13 views

Query posts by categories and tags using free text search

I'm currently building my own search results page which takes a value from the URL. I'm able to query the post title easily enough by using the S parameter however I'm wondering how I could expend ...

1
2
3 4 5
35