All Questions
Tagged with search custom-post-types
223
questions
0
votes
0
answers
13
views
Multiple search forms and respective results page templates?
I have a Woocommerce site and I would like to set up two different search forms, one for products and one for everything else (pages, posts, and a couple CPTs) that would render on it's own respective ...
0
votes
0
answers
33
views
How to add CPT in Elementor pro search template
i have created a Search template in elementor pro, i'm using Archive Posts widget to show the result.
but the problem is i want to include the CPT in the result.
i tried the pre get post function, ...
0
votes
0
answers
41
views
Fix Custom Post Type not appearing in search results?
I am using ACF to create a custom post type (CPT = "books"). I cannot get the CPT to appear in Wordpress search results (I tried both default Elementor search widget and Jetsearch)
I have ...
1
vote
2
answers
57
views
Search for portfolio tags & mixing portfoliotags and post tags
I have been trying to filter my search result without success.
Here is my function in functions.php
I want to retrieve only post and portfolio posts (no pages).
Below is the code I found on your ...
0
votes
0
answers
51
views
Search and filter terms of a custom post type only and display results
I am creating an archive-newsroom.php for my /newsroom page and custom post type. I have the custom post type working, but now I am trying to have a search input to display the custom post type ...
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 = ...
0
votes
2
answers
96
views
How to Display Content from Search URLs on Permanent URLs in WordPress?
The search link for a WordPress website looks something like this: https://example.org/?s=seo or https://example.org/?s=blogging.
For certain specific pages, I prefer to use permanent links. For ...
0
votes
2
answers
62
views
Exclude multiple custom post types from search
I'm trying to exclude a couple of custom post types from search results. The following works for one post type:
// Exclude custom post types from search
add_action('init', '...
-1
votes
1
answer
38
views
How do I create a custom search function to only show contact information if they search for an exact unique identifier?
I’m hosting a conference in the future and will be collecting several hundred attendee’s names and email addresses when they register on my site.
To help with networking and connecting them after the ...
1
vote
1
answer
31
views
How can I retain get_post_type() in between consecutive searches after a search returns no results?
I've been trying to find an answer to this, but I haven't found anyone asking the same question.
I have multiple custom post types, with each having its own archive page and search form. As they all ...
0
votes
1
answer
269
views
How to exclude html tags and class on search
I wanted my search to exclude html tags so that in the search results page it wont show html tags and class. I'm a beginner in wordpress development so i find it hard to understand some functions. ...
0
votes
0
answers
28
views
Meta_query question
There is a problem with compiling a request to display posts by meta_query.
Need to output posts whose title contains a substring.
Can't figure out where I'm wrong. Can someone help?
$inputValue = '...
0
votes
1
answer
129
views
Why custom search engine only searches in post titles of custom posts?
I am working on a custom search engine for a custom post type (articles) with custom fields in WordPress PHP (online magazine). It works almost fine, the only problem is that somehow the search is ...
0
votes
0
answers
83
views
How do I provide a search form for a specific post type, that is capable of searching within custom fields of the specified CPT?
I'm building a site that will have four post types:
The default 'page' and 'post' post types. And two custom post types.
The two custom post types will have custom fields and custom taxonomies.
I'd ...
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 ...