Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('relevanssi_content_to_index', 'add_extra_content', 10, 2);
- function add_extra_content($content, $post) {
- $images = get_field_object('gallery', $post->ID);
- if($images){
- foreach( $images as $image ) {
- $content .= " " . $image['title'];
- $content .= " " . $image['caption'];
- }
- return $content;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement