• Resolved toca711

    (@toca711)


    Hi.
    Excellent plugin.

    Is it possible to insert custom metadata into a store listing post content section either by custom shortcode or some other way? or does it all need to be done with css

    I can already get the custom meta to display in custom store template but really want to play with column lay out and not have everything in one column?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    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.

    Thread Starter toca711

    (@toca711)

    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?

    Plugin Author Tijmen Smit

    (@tijmensmit)

    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.

    Thread Starter toca711

    (@toca711)

    Excellent thanks.
    This plugin is fantastic and you support is top class.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Insert custom meta into store post content’ is closed to new replies.