How do I call a template for the shortcode
-
Hi,
I am using a shortcode as follows:
[summarize-posts post_type="bio" taxonomy="post_tag" taxonomy_term="farm" order="ASC" orderby="menu_order"] <p style="min-height:10px;clear:both;"> </p> <div class="bio_title"> <h2 class="storytitle"><a href="[+permalink+]">[+post_title+]</a></h2> </div> <img class="mugshot" src="[+bio_mugshot:to_image_src+]" alt="" /><span class="bio_meta_heading">Position</span><span class="bio_meta_content">[+bio_position+]</span> <span class="bio_meta_heading">Phone</span><span class="bio_meta_content">[+bio_phone_number+]</span> <span class="bio_meta_heading">Email</span><span class="bio_meta_content"><a href="mailto:[+bio_email_address+]">[+bio_email_address+]</a></span> [+post_content+] <div class="fixfloat"></div> [/summarize-posts]What I really want to do is something like this:
[summarize-posts post_type="bio" taxonomy="post_tag" taxonomy_term="farm" order="ASC" orderby="menu_order" tpl="path/to/bio.tpl]Where bio.tpl is:
<p style="min-height:10px;clear:both;"> </p> <div class="bio_title"> <h2 class="storytitle"><a href="[+permalink+]">[+post_title+]</a></h2> </div> <img class="mugshot" src="[+bio_mugshot:to_image_src+]" alt="" /><span class="bio_meta_heading">Position</span><span class="bio_meta_content">[+bio_position+]</span> <span class="bio_meta_heading">Phone</span><span class="bio_meta_content">[+bio_phone_number+]</span> <span class="bio_meta_heading">Email</span><span class="bio_meta_content"><a href="mailto:[+bio_email_address+]">[+bio_email_address+]</a></span> [+post_content+] <div class="fixfloat"></div>Is this possible. The private static function _get_tpl on wp-content/plugins/custom-content-type-manager/includes/SummarizePosts.php would seem to suggest this. But it never works.
Please can you help. I don’t want my editors to have to deal with the formatting of their “people” pages. I just want them to be able to enter in the shortcode and then they don’t have to revert to HTML and can stay in happy WYSIWYG land.
Thanks heaps for any help you can provide.
Regards
David Lathamhttp://ww.wp.xz.cn/extend/plugins/custom-content-type-manager/
The topic ‘How do I call a template for the shortcode’ is closed to new replies.