Forums › Forums › Search & Filter Pro › Enable has_archive
Tagged: has_archive
- This topic has 10 replies, 2 voices, and was last updated 3 years, 11 months ago by Anonymous.
-
Anonymous(Private) November 30, 2020 at 10:08 pm #268293
Hello,
I have a custom post type, I feel lost 🙂
How to enable has_archive?
I didn’t found has_archive on my function.php theme.I am not a developer, I understand css/html but I need your support to enable has_archive as true.
Could you help me please.
Best reragrds
SamTrevor(Private) December 1, 2020 at 9:28 am #268312How is that Custom Post Type made? There are normally four ways:
#1 By your parent or theme (usually in functions.php)
#2 By a custom post type plugin
#3 By another plugin, such as Events Manager, or WooCommerce, and many others
#4 By a custom plugin made for you by a developer for your siteWhich of these is it?
If it is #1, can you show me the part of the code that makes that custom post type? Please post any code here inside code ticks (one before the code, one after)? On my UK Windows keyboard, the code tick key is next to the 1 key in the standard part of the keyboard. If you do this Google search and look at the images, they show various keyboards and where the key is located:
Anonymous(Private) December 1, 2020 at 12:41 pm #268370Hello,
Thank you for your response,
Something missed,I use CPT UI and your plugin, I’ve added ‘product’ as CPT, I’ve added a filter ‘taxonomy 1: brand, and taxonomyy2: Categorie. I followed the instruction it worked, the filter works fine.
* I checked ‘product'(without woo-commerce, is it correct?) in the general tab.
* And ‘custom post type’ in the display result.Taxonomy worked but But the search field didn’t work, It shows a 404 page
I use templatetoaster theme (parent)
I tried to create archive-product.php and single-product.php but the website use single.php and archive.php.
I’ve added any code in the theme and function.php .. 🙂
Thank you or your help,
Best regards.
SamTrevor(Private) December 2, 2020 at 1:36 pm #268519I think this is the solution for you. Our plugin does not directly allow you to do text searches of individual Post Meta (custom fields) and Taxonomy (Category, Tags and Taxonomies) data/terms. The Search & Filter Pro Text Search field uses the standard WordPress search, so looks only in the Post Title and Content. To help you control this better, on the form’s Advanced settings tab you will see 2 settings for Relevanssi.
The documentation for this is here:
https://www.designsandcode.com/documentation/search-filter-pro/3rd-party/relevanssi/
You would need to install and activate the free Relevanssi plugin as well.
Then set Relevanssi up and build its index (make sure it is indexing the desired post types, custom fields AND any taxonomy that you want to search).
This solution might also be needed if your theme is changing how the WordPress text search works.
-
AuthorPosts