When I search on my site it currently doesn't search the content in my custom meta boxes.
How can I include this content when searching?
I'm registering my meta boxes as follows:
$meta_box['recipe'] = array(
'id' => 'recipe-meta-details',
'title' => 'Recipe Meta Details',
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => 'Country',
'desc' => 'Country dish is from',
'id' => 'recipe_country',
'type' => 'text',
'default' => ''
),
array(
'name' => 'Serves',
'desc' => 'Number of people dish serves',
'id' => 'recipe_serves',
'type' => 'text',
'default' => ''
),
array(
'name' => 'Ingredients',
'desc' => '',
'id' => 'recipe_ingredients',
'type' => 'wysiwyg',
'default' => ''
),
array(
'name' => 'Method',
'desc' => '',
'id' => 'recipe_method',
'type' => 'wysiwyg',
'default' => ''
)
)
);
And displaying them like this in my custom post archive loop:
$recipe_country = get_post_meta($post->ID, 'recipe_country', true);
$recipe_serves = get_post_meta($post->ID, 'recipe_serves', true);
$recipe_ingredients = get_post_meta($post->ID, 'recipe_ingredients', true);
$recipe_method = get_post_meta($post->ID, 'recipe_method', true);
<div id="post-content-left">
<h3>Ingredients</h3>
<?php echo $recipe_ingredients; ?>
</div>
<div id="post-content-right">
<h3>Method</h3>
<?php echo $recipe_method; ?>
</div>
Thanks