I am trying to:
use a shortcode in a custom field (from another plugin "Download Monitor" which worked fine with Types up to and including version 3.0.5 ). However, later versions of Types after 3.0.5 broke the parsing of this shortcode in a custom field.
Link to a page where the issue can be seen:
hidden link
I expected to see:
PDF(click to download): Uniqueness of the Index Map in Banach Algebra K-theory, II
Instead, I got:
PDF(click to download): [download id="1310"]
This is one example where it didn't work, but every article page (over 100) failed. I was forced to go back to version 3.0.5 --- I haven't kept the failed version of Types active but if you need to see that I suppose I could force my site to fail briefly. Let me know...
Hi, can you copy + paste the code used to render this field on the front-end of the site? This may include Views, nested Views, their Content Templates, shortcodes inserted in a custom page, etc.
Then please take a screenshot showing this Article Post Editor screen in wp-admin, so I can see the custom field value for this custom field. It doesn't have to be the whole screen, just the field group is fine. Include this with your next reply.
Hi Christian
Thanks for the weekend reply!! Enclosed is a screen grab of the custom field in question as well as the code for the content template used to render the field. Please let me know if you need anything else.
thanks
Martin
content template code (article2): note last span statement with [types field="pdf-full-text" output="raw"][/types]
<div class="row-fluid">
<div class="span12">
<div class="customtitle">[wpv-post-title]</div>
<div class="bordertop"><p class="alignleft">[published_hook]</p>
<p class="alignright">[types field="published" style="text" format="F j, Y"][/types]</p>
</div>
<div style="clear: both;"></div>
<blockquote>[types field="authors-full-address" separator=""][/types] </blockquote>
<div><p class="borderline"><b>Abstract/Résumé:</b></p></div>
[full_text_wpcf]
<div class="bordertop">
<b>Keywords: </b>[wpv-post-taxonomy type="keyword" separator=", " format="link" show="name" order="asc"]<br /><b>AMS Subject Classification: </b>
[wpv-post-taxonomy type="ams-class" separator=", " format="link" show="description" order="asc"]
[wpv-post-taxonomy type="ams-class" separator=", " format="link" show="name" order="asc"]
<div class="bordertopbottom">
[restrict paid="true"] [/restrict]
<span STYLE="color: green; font-size: 16px; font-family: Helvetica;"><b>PDF</b>(click to download):<span>[types field="pdf-full-text" output="raw"][/types]</span></span>
</div>
</div>
</div>
</div>
What happens if you remove the output="raw" from the Types field shortcode? Is the stored shortcode executed or still written out?
Yes Christian! That was it! I removed the output="raw" from the shortcode and it works now for the current Types version. Thanks so much for your fast advice!
My issue is resolved now. Thank you!