The customer was unable to get Relevanssi to recognize their custom post types ("fires") on their site, resulting in zero search results, despite it working with other content areas.
Solution:
We identified that the issue stemmed from the theme filtering the post types available in the default search widget, restricting results to only pages and posts. We adjusted the settings under Appearances > Theme Settings > Layout Settings > Search Content to exclude the filtering, allowing all custom post types to be displayed. After this adjustment, search results were successfully returned.
I am using custom code to modify a View’s query based on taxonomy term slugs. This works, but now the taxonomy search filters (ld_course_category and ld_course_tag) no longer function properly in the view.
Solution:
The issue arises because your custom tax_query overrides the existing query, including filters for ld_course_category and ld_course_tag. To fix this, merge your custom tax_query with any existing tax_query conditions to preserve the original filters. Use a check to append your custom taxonomy query to the existing tax_query instead of replacing it.
I want the custom post types for farms and restaurants on my site to not display the post name in their permalinks, using only the post ID instead. This is because I’m building a paid member directory, and displaying the name in the URL could give away sensitive information.
Solution:
The URL structure of custom post types is managed by WordPress settings, not Toolset. To achieve ID-based URLs, go to WordPress Dashboard > Settings > Permalinks and set the structure to "Plain".
Alternatively, using a plugin like "Custom Post Type Permalinks" can help customize the permalink structure to meet your needs.