Skip to main content

All Questions

0 votes
0 answers
24 views

Get a custom post type's taxonomy type term names displayed as checkboxes and filter

I using this code to get all the taxonomies associated with a custom post type "newsroom" $post_type = 'newsroom'; // Get taxonomies associated with the custom post type $taxonomies = ...
Justin's user avatar
  • 101
0 votes
1 answer
192 views

Hook a search form anywhere on the site, using a custom plugin

I'm new and I apologize if I ask an already existing question. But I can't find the information I'm looking for. I need to know how a search form works in wordpress. I'm creating a custom theme and ...
f3l1x's user avatar
  • 1
1 vote
1 answer
54 views

Wordpress search results grouped by post type

I've been struggling to make it work. This code works and returns post_type title and post titles inside it. I found it here But i need to have some sort of formatting and excerpt. Currently I cannot ...
m2itz's user avatar
  • 11
0 votes
0 answers
169 views

Custom search template is showing 404 when adding query string

I've created a custom theme and a page template page-search.php, because the original search will search under the homepage url. The page works just fine without query string but when I add /?s=1 at ...
odedta's user avatar
  • 86
0 votes
1 answer
87 views

Post and page content not displaying in search results

I am using a content-search.php template part to output my search results. The post/page titles and links to those posts/pages are working correctly, but for some reason the the_content() function is ...
Mike Hermary's user avatar
0 votes
1 answer
448 views

how to get this tax_query working?

I have wp_query including custom taxonomy terms which works if all the fields have values. Otherwise, it is giving 0 results. This is the form that is used to get the taxonomy terms. Based on the ...
user2584538's user avatar
0 votes
0 answers
53 views

Why not works the search.php file?

I'm sorry, I speak a little English. All posts (example) in my custom theme index.php listing: Cam on Cam off Applications West side Many money I have a custom theme and custom search.php file. If I ...
jozs2021's user avatar
0 votes
1 answer
87 views

Is it possible to show sort page excerpt in search.php

Current I have my search just return the title of the page that has the result, is there a way to show an excerpt This is what i have <?php get_header(); ?> <section class="page-wrap&...
Milly Roc's user avatar
1 vote
2 answers
722 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 ...
Devon's user avatar
  • 35
1 vote
1 answer
52 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-...
proseosoc's user avatar
  • 117
1 vote
1 answer
49 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?
Phantasmix's user avatar
1 vote
3 answers
2k views

Group search results by post type, but hide post types with no results

I was looking for a clean way to group my search results by posttype. I currently have 3 post types: Page, Post and Glossary. After a long search this answer in this thread got me what I needed. The ...
Justin's user avatar
  • 45
0 votes
1 answer
407 views

Custom Search form not working in localhost

This was the solution that i got from @Ray Gulick for having a custom search form for custom post type. This works fine in hosting service but fails in localhost as the form action is added as action=...
user avatar
1 vote
1 answer
1k views

Search filter by Post title OR Meta Title Value [duplicate]

I am trying to search Movies by it's Post title OR Meta Title value. But it is not working, it only search's by Meta value. I need to search by Post title as well and i.e check if the keyword is ...
Nimesh Deo's user avatar
-1 votes
1 answer
2k views

How to get value of a selected option from select tag and use it in WP_query to filter posts?

This is how I'm getting the value but how to use it in WP_Query so when I click Search to display let's say posts with Option 1 value? I'm doing this but don't know if meta_value is the answer $...
Jets's user avatar
  • 1

15 30 50 per page