- This topic has 1 reply, 1 voice, and was last updated 10 years, 5 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Is there a variation shortcode?
Tagged: shortcode, Variation shortcode
Hi
I am providing a custom field to my client from where he will insert the product id, this way I can create a custom page template.
I do:
<?php
$productId = get_field(“product_id”);
echo get_button_code_for_product($productId);
?>
it works ok but it is not displaying the variation, if I insert the number manually the variation appears.
E.g. <?php echo get_button_code_for_product(1); ?>
is there any way I can call the variation with its own shortcode? or any idea why the variation isn’t displayed doing it the way I am doing?
Thanks a lot
Ok the solution I have found is to simply use the_content(), and insert the cart via your plugin icon on the ditor. The create custom fields to upload photos, this way i can lpace the_content(); [the cart button with variation] anywhere in my template and load the “real content”, text and images via custom fields somewhere else in the template.