davidnde
Forum Replies Created
-
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Snippets not created from Custom Fields?Hi guys.
I was having the same problem, the excerpt created by relevanssi does not contain any content from custom fields. This is my workaround:
Let’s say you are in the following situation. You have a post-type my-custom-post-type (or post or page) that is extended with custom fields (aka meta-data) myfield1 and myfield2. We want the content of those field be contained in the excerpt generated by relevanssi. Since the the_content hook is used by relevanssi to get the content it creates the excerpt from, we need to implement this hook, either in you functions.php or in you plugin file (Make sure to replace my-custom-post-type, myfield1, myfield2 and functionnames in the following code):
[Code moderated as per the Forum Rules. Please use the pastebin]
This is not the nicest hack but it works perfectly. I would request the following feature from the developers: Register a custom hook for this purpose so we don’t need backtracing and make the $post object available as you would expect it when the_content is triggered.
Forum: Themes and Templates
In reply to: Custom fields on custom post types…+1
thank you @airboxmedia!
Forum: Hacks
In reply to: Get item of the 2nd level – wp navI am facing the same problem and I agree that not implementing this feature is strange.
Splitting a navigation into parts depending on the level is a standard task webdevs are facing.