Get this plugin working for a business listing site; how I did it.
-
You can structure your request in a template setting using this code, with this plugin, your variables are going to be different.
Full;
<?php $name = get_the_title(); $listing_id = !empty( $listing_id ) ? $listing_id : get_the_ID();
$addy = esc_html( get_post_meta( $listing_id , ‘address’, true ) );
echo do_shortcode(‘[yelpprofile term=”‘.$name.'” location=”‘.$addy.'”]’);
?>What is important?
echo do_shortcode(‘[yelpprofile term=”‘.$name.'” location=”‘.$addy.'”]’);Everything above that line creates the variables for $name and $addy (which is the address string). We’ve now deployed this across a load of listings.
Thanks for the plugin!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Get this plugin working for a business listing site; how I did it.’ is closed to new replies.