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

    (@tijmensmit)

    You should create a custom template.

    The code on this page only shows the main content, and the store shortcodes. If you want to include the opening hours, then you need to add this in the template:

    echo do_shortcode( '[wpsl_hours]' );

    If the template breaks, then have a look at the structure of the single.php in your theme and use that as a base for the the single-wpsl_stores.php template ( without the part that shows the data and author ).

    Thread Starter ascheripartners

    (@ascheripartners)

    Thank you. I’m not sure if I did something wrong, but that code was showing the map and the address twice. I commented a couple of lines and it’s ok.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    The code from the custom template showed the address and map twice? What did you change?

    Thread Starter ascheripartners

    (@ascheripartners)

    I just pasted the following block in the code I got from single.php, but then commented two lines to not show things twice:

    <?php
                        global $post;
                        $queried_object = get_queried_object();
    
                        // Add the map shortcode
                        // echo do_shortcode( '[wpsl_map]' );
    
                        // Add the content
                        $post = get_post( $queried_object->ID );
                        setup_postdata( $post );
                        the_content();
                        wp_reset_postdata( $post );
    
                        // Add the address shortcode
                        //echo do_shortcode( '[wpsl_address]' );
                    ?>

    Plugin Author Tijmen Smit

    (@tijmensmit)

    What is the name of the theme you are using? Someone else mentioned this issue before with the map and address showing twice, but I can’t replicate it myself.

    Thread Starter ascheripartners

    (@ascheripartners)

    Zenko Magazine

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Hide the by-line in store pages’ is closed to new replies.