• I have put images and other content into the main section of the individual store posts. I would like this content to display underneath the map.

    I created the custom template and put in the following code

    <?php 
    global $post;
    $queried_object = get_queried_object();
    echo do_shortcode('[wpsl_map]');
    $post = get_post( $queried_object->ID );
    setup_postdata( $post );
    the_content(); 
    wp_reset_postdata( $post ); ?>

    The problem I’m having is that the_content displays all the content – including the map, contact, opening hours etc. So by adding the map shortcode I’ve created a duplicate map.
    How can I distinguish between the regular post content and the store details?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom store page template – duplicated content’ is closed to new replies.