If I understand correctly you want the custom meta data to show up in the search results?
The second and third step in this article explain how to do that.
Hi.
Thanks but I can do that. will try to make myself clearer.
Say I want to do a blog post each week called store of the week.
I want to highlight that store in a blog post. I can add some data with the shortcodes (Eg map address etc)but I want to be able to put all my custom meta data inside the blog post. (I already have the metadata showing in the store listing page and some in the info box)
Is this possible?
I think the only way to do that is by creating your own shortcode.
So in the functions.php inside your active theme folder you can try to do something like this and grab the rest of the custom meta data that you need. It’s all untested, but you get the idea.
function wpsl_get_custom_data() {
global $post_id;
$data = do_shortcode( '[ wpsl_address ]' );
$data .= get_post_meta( $post_id->ID, 'wpsl_my_custom_value', true );
return $data;
}
add_shortcode( 'wpsl_custom_data', 'wpsl_get_custom_data' );
Then in the post content in the editor you simply add [wpsl_custom_data], and it will output the address followed by whatever custom data you want to show.
Excellent thanks.
This plugin is fantastic and you support is top class.