• Resolved charlotte

    (@charlotte23)


    I think this is a great plugin and I can see that the author is really helpful.

    I want to put the directions link in the single store page and I can’t see how to do it.

    I’ve already needed to turn the email into a link – helpfully there is documentation to help do that on the listings page but there isn’t any documentation on doing it in the single store page and I ended up amending the core class_frontend.php file. I could do that again with adding the directions link but the $listings_template function which pulls the direction into the main locator page and the code in the class_frontend.php core file are very different and I can’t get it to work.

    Can you help me with the code?

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

    (@tijmensmit)

    If you want to include a directions link, then can copy this code, and past it in the single-wpsl_stores.php file wherever you want the link to show up.

    I will include a shortcode attribute in the next major update that allows you to turn the email into a link, without having to edit the code.

    An alternative way to turn the email into a link is by copying the code that handles the wpsl_address shortcode from line 727 till 806, remove the $atts[‘name’], $atts[‘address’] etc from the if checks, and replace $atts[‘id’] with $queried_object->ID.

    Also instead of global $post; change it to global $post $wpsl; in the template file.

    What I wrote above about copying the code is untested, but it should work.

    Thread Starter charlotte

    (@charlotte23)

    Thank you Tijmen I appreciate your assistance. That worked great.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Single store listing’ is closed to new replies.