Always the same post using relevanssi_excerpt_content
-
I’m trying to use the filter hook relevanssi_excerpt_content to show a custom field called description in my search-excerpts.
add_filter('relevanssi_excerpt_content', 'fkp_search_custom_excerpt', 10, 3); function fkp_search_custom_excerpt($content, $post, $query) { $content = $post->description; return $content; }
It seems I’m doing something completly wrong, cause on every post excerpt in the search results, I get the ‘description’ from the last post displayed.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Always the same post using relevanssi_excerpt_content’ is closed to new replies.