Questions tagged [search]

The method by which users find information on your WordPress site

Filter by
Sorted by
Tagged with
0
votes
0answers
13 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
13 views

year make model trim engine search on woocommerce [closed]

I'm working on a clients website who sells automotive parts online this website is WordPress/woo they utilize a year make model trim engine search this search pulls the information from the ...
0
votes
0answers
10 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
17 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
12 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
10 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
25 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
11 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
36 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
13 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
15 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 ...
0
votes
0answers
5 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
17 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
27 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
39 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
16 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
13 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
16 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
9 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
31 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
14 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
23 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
11 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
votes
1answer
43 views

How to search pdf attachment?

I am using advanced custom fields to create a custom field. I created a custom field called upload pdf. I can attach the pdf file using this field and the field type is File. Suppose there is a ...
0
votes
0answers
28 views

Extending woocommerce admin product search with custom fields

I have added several custom fields to my Woocommerce products using ACF Pro. I need to be able to search for custom fields values while using search box in the backend Products list page. Any help on ...
0
votes
1answer
15 views

ajax stopped working when not logged in wordpress

My code works fine if user login but not work when log out functions.php //ajax search -- // add the ajax fetch js add_action( 'wp_footer', 'ajax_fetch' ); function ajax_fetch() { ?> <script ...
0
votes
1answer
6 views

Redirect to a page while maintaining search query parameters without causing an infinite loop

We are making use of a plugin called Product Filter by XforWoocommerce. It has a feature that limits the available product filter options based on what products are visible, however, it does not work ...
0
votes
1answer
12 views

make link to search page

I have a search Icon in menu section of my site and looking for a way to when a user click on this search icon, redirected to the search page. in the search page, there is a search form and also ...
0
votes
0answers
26 views

WP_Query no result if keyword contains number

$args = [ 's' => $autocompleteTerm, 'orderby' => 'modified', 'fields' => 'all', 'post_status' => array('publish','future'), ]; $posts_query = new \...
0
votes
0answers
34 views

How to search media library alt text and title fields

I need to be able to search in the WordPress media library alt text and title fields. I've previously used a plugin called Media search Enhanced by 1fixdotio (https://wordpress.org/plugins/media-...
0
votes
0answers
10 views

How can I create zip code search filter to link to specific agent(s) on same page?

I have a page on my site (https://eliterenetwork.com/member-roster/) that has a list of agents that are categorized by states they do business in. I'd like to create a search filter at the top of the ...
0
votes
0answers
27 views

Optimize WP search query term

I made the following filter to remove s from terms shirts or hoodies, however I don't think it's the way it should be. Any ideas if I can make it in a more proper way? add_filter('posts_where',...
0
votes
0answers
31 views

Tweak the WP Query search

I am having a hard time trying to find a way to tweak the search option on my wordpress website. For example: I have products with the word electronic and monitor in the title, however when people ...
0
votes
0answers
4 views

using url parameters for a search, but for custom post_type the date is missing from results. I checked the index.php and search.php

I am using search url parameters for a search, "www.gigs.com/?s=piano&post_type=post" and it works - but if I use a custom post type "www.gigs.com/?s=piano&post_type=xdays1&...
0
votes
0answers
14 views

How to close expanding search bar on scroll or click anywhere

I have customized the woocommerce search form using an expanding search bar tutorial. At the moment it opens and closes on click of the magnifying glass icon. Instead, I would like it to close when ...
0
votes
1answer
9 views

Cannot make custom search permalink to work in a fully custom theme. Search string $_GET['s'] is always empty

I am learning to build a fully custom WordPress theme. I have a search form <form role="search" method="get" class="search-form" action="<?php echo home_url() ?...
0
votes
0answers
25 views

Add pagination to custom search

So I took over a site, and the problem being that I would like to add the pagination to the custom search made by the former developers. I have a little trouble to find my way around and I would have ...
0
votes
1answer
14 views

Search results thumbnails different size

Seems that according to the nature of my theme, whenever I do a search query and a result from my Projects section appears, the pictures appear huge and even break the footer! Whereas if I do a search ...
1
vote
1answer
80 views

Can't search posts using WP_QUERY inside AJAX Function

WP_Query is used to get posts via simple arguments provided by it. WordPress provides an argument called 's' for search. It basically searches content of all posts and lists the ones with that string ...
0
votes
0answers
8 views

can't get url parameters working with metadata for searching posts

I am trying to get a custom feild added as a search paramter url. my post metadata for this example is 'public_paywall' and want to register as it as a query var "access" This is the code I ...
0
votes
1answer
146 views

How to Fix Form elements do not have associated labels in Wordpress Search Form (without button)

Is there any way to fix the "Form elements do not have associated labels" issue in WordPress search form without having the search button. Google Light House Audit: Form elements do not ...
0
votes
1answer
128 views

How to add WooCommerce SKU to search query?

I have issue adding the meta_value in search query for the WooCommerce SKU. By default, the search by SKU only work on the admin. I would like to make the frontend search accepting SKU in search. Note ...
0
votes
0answers
12 views

How to make WordPress search more flexible?

My customer has a WooCommerce product catalog that uses a number of different naming conventions. A part commonly referred to as D100 could actually be named D100, D100-BLACK, D100BLACK, D100 BLACK, ...
0
votes
1answer
11 views

edit URL of search result

i have wordpress website with sailent theme i have default search in header the result of search is http://www.example.com/?s=colagen while "colagen" is the key that type it in search but ...
0
votes
1answer
20 views

search custom post type by custom fields on front end

I want to add filter to my site and want to filter custom post type by custom fields for example i have a custom field with name country when a visitor enter a country it should show all custom post ...
0
votes
0answers
17 views

Filter search results by post_tag if exist

I want to get posts from search results using post_tag. for example If a user input in the search form "party". First, we search if "party" exists in post_tag and show all posts ...
0
votes
0answers
10 views

How to get search result as image rather than page

so I'm making a meme template(image) website . But when i try to search a template the search result show the page it is in rather than actually showing the template(image). What can i so do to show ...
0
votes
0answers
16 views

Woocommerce Search perform “like” query

I have a search box on woocommerce site and it seems to only find products if the searcher enters the keyword exactly so if they search for Kola bottles it will not find it as the title is "cola ...

1
2 3 4 5
34