PHP does not work in the Rewrite area, though this is a good idea that I may implement in the future. I’ll keep you up to date.
Hi boutzamat,
In the newest release (1.5.23), I added options for meta value (custom) fields that should help this issue.
When editing a meta value field, if you have CCTM plugin active, you should be able to select it as the field’s “Display Handler”. Additionally, you can add CCTM output filters to the field.
For example, if you have an Image field that is a repeater, you can; change the “Count” to 0, select “CCTM: get_custom_field” as the display handler, put “:to_array:raw” as the “CCTM Output Filters”, check “Load Image IDs as Images”, and select the “Image Display Style”. This should output the CCTM fields as images of the chosen style.
Let me know if you get a chance to test this, and if you have any issues.
Thanks,
Jonathan
Hi Jonathan.
Once again thanks for your awesome plugin, and more awesome support ..
You did it, it works excellent xD
Only, then i look in the documentation of CCTM the only way to get the full path for my PDF’s (i want to make them downloadable instead of link to the post that has it attached) the only possible solutions for getting the full url for the pdf is:
<?php print_custom_field(‘my_pdf:get_post’,’Download PDF‘); ?>
OR
“>Download PDF
OR when using a tpl (e.g. via a summarize-posts shortcode)
// If your query loops over the actual PDFs:
Download [+post_title+]
// If your query loops over pages with custom fields that contain the pdfs, you need to get the guid of the referenced pages:
Download [+my_pdf:get_post==post_title+]
i tried the filters supplied in the documentation, but none of them seems to give the desired result – full path for the file.
There’s no way for running PHP in rewrite, is there? :/
Thanks again, and sorry for bringing a post that might not be your “issue” .. but thanks for taking time to help ..
Are you using the “Media” field type to upload the pdf? If not, what field type are you using, and could you explain a little about how you’re using it?
I came upon this post looking for same. My intended use:
<?php if($post->post_content != "") : ?><span class="green-btn"><a href="{{permalink}}">Full Profile</a></span><?php endif; ?>
In keeping with my response to your Wish List post, where I nominated {empty} behavior for each field. 🙂
Hi tyme,
I recommend looking at the “Callback” field for PHP support. I don’t plan on allowing PHP form within the QW interface. The FAQ has 2 examples of using a callback field. Tokens can be made available to the callback by including additional information (checkbox).
http://ww.wp.xz.cn/plugins/query-wrangler/faq/