Hi,
I'm trying to ebed one of these shortcodes (For example <?php echo do_shortcode('[Woo_stamped_io type="widget"]'); ?>)
Onto my product page template, so that it shows up under the 'categories' section.
I thought I'd just be able to insert this as indicated below. But this is not working. Can you tell me what I'm doing wrong?
hidden link
<h1 class="page-title">[wpv-post-title]</h1>
<ol class="breadcrumb">
[wpv-post-link id="59"]
</ol>
<div class="card panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-sm-3">
[wpv-woo-product-image size='shop_single' output='' enable_third_party_filters='no' gallery_on_listings='yes' class="img-rounded"]
</div>
<div class="col-sm-offset-1 col-sm-4">
Description
[wpv-post-body view_template="None"]
<hr lass="divider">
<dl>
<dt>Categories</dt>
<dd>[wpv-post-taxonomy type="resource-category"]</dd>
</dl>
<?php echo do_shortcode('[Woo_stamped_io type="widget"]'); ?> (HERE!)
[wpv-conditional if="( $(wpcf-product-installation-instructions) ne '' )"]
<div class="well well-sm">
Instalation instructions
</div>
[/wpv-conditional]
[types field='video-youtube' width='100%' height='auto'][/types]
</div>
<div class="col-sm-offset-1 col-sm-3">
<div class="well well">
<h3>Get the resource</h3>
<hr>
[wpv-conditional if="( '[wpv-current-user]' eq '' )"]
<p class="lead">To access resources please hidden link">join now or log in.</p>
[/wpv-conditional]
[wpv-conditional if="( '[wpv-current-user]' ne '' )"]
[wcm_restrict plans="member-standard"]
[wpv-woo-buy-options add_to_cart_text='Add to basket']
[/wcm_restrict]
[wcm_nonmember plans="member-standard"]
<p class="lead">To access resources please hidden link">join now
[/wcm_nonmember]
[/wpv-conditional]
</div>
[social_warfare]
</div>
</div>
</div>
</div>
Hello,
In views content or content template, you can not use PHP codes directly, but you can use shortcode directly, for example, replace this line from:
<?php echo do_shortcode('[Woo_stamped_io type="widget"]'); ?> (HERE!)
With:
[Woo_stamped_io type="widget"]
Thanks, tried that but as per screenshot its still not displaying - not sure if Im missing something?
hidden link
It seems that shortcode [Woo_stamped_io type="widget"] does not work in your website.
Please try to display this shortcode '[Woo_stamped_io type="widget"] directly in post content, make sure it can display something in your website.
Thanks its working now.
My final challenges is finding what I presume will be another content template that manages this page listing
hidden link
where I'd like to make another short code appear under each of the individual listed items.
Can you guide me to the correct content template please?
What is the another custom shortcode?
How do you setup/create it?
I have checked the URL you mentioned above:
hidden link
It seems to be archive page of taxonomy "resource-category", and I assume you are using Views WordPress archive to customize this page.
If it is, please edit that Views WordPress archive:
Dash-> Toolset-> WordPress Archives, find and edit the specific WordPress Archives(ID: 1672), and put your custom shortcode into section "Loop Editor", within view's loop:
<wpv-loop> ... </wpv-loop>
More help:
https://toolset.com/documentation/getting-started-with-toolset/customize-post-archives/designing-an-archive-without-any-page-builder/