- December 26, 2016 at 6:01 am #3869
Hi I’ve created soe custom post types, but they don’t automatically appear in the search options. Can you please tell me how I can add? (It seems to be related to the redux framework)December 30, 2016 at 2:22 am #3876
as you can see there is no additional option for search with custom custom post type, but you can tweak the code if you want to add your custom post type appear in search result.
There is 2 result page for search, search.php (native search) & searchresult.php (ajax search).
If you open both search.php & searchresult.php, you’ll found ‘post_type’ word.
Replace the ‘$val_post’ with :
Save your files.
Let me know if it doesn’t help.January 27, 2017 at 12:55 pm #3939
does this allow us to customize appearance of search results page? For example, like in curated theme under Homepage, there four options for homepage appearance called “latest post layout”
will adding this code allow for post layout, or how can this be done to allow these 4 layout options for Search (native/Ajax) results?January 28, 2017 at 6:40 am #3940
Nice questions. Unfortunately, the ‘Page Builder’ template only support for regular ‘post’ type, not other post type.
The code above only works for search result page. For example, if you have ‘portfolio’ or any post type, you can show them in the search result page with code above.
You must be logged in to reply to this topic.