xili-postinpost shortcode provides a toolkit to insert post(s) in content spaces in post or page. The displayed post(s) are resulting of queries like those in WP loop but not interfere with main WP loop.
[xilipostinpost query="p=1"] |
another example:
[xilipostinpost query="cat=3,4,150&showposts=2&lang=en_us"] |
as visible here in « About » page.
Parameters :
As readable in source code, in addition to « query » lots of parameters are available:
$arr_result = shortcode_atts(array('query'=>'','showposts'=>1, 'showtitle'=>1,'showexcerpt'=>1,'showcontent'=>0, 'beforeall'=>'<div class="xi_postinpost">', 'afterall'=>'</div>', 'beforeeach'=>'', 'aftereach'=>'', // 0.9.4 'beforetitle'=>'<h4 class="xi_postinpost_title">', 'aftertitle'=>'</h4>', 'beforeexcerpt'=>'<object class="xi_postinpost_excerpt">', 'afterexcerpt'=>'</object>', 'beforecontent'=>'<object class="xi_postinpost_content">', 'aftercontent'=>'</object>', 'featuredimage' => 0, 'featuredimageaslink' => 0, 'featuredimagesize' => 'thumbnail', 'read' => 'Read…', 'from'=>'','to'=>'','expired'=>'' ), $atts); |
Example as shown in this demo post:
[xilipostinpost query="attachment_id=1875" from="****-**-** 00:00" to="****-**-** 12:00" expired="this is afternoon" beforeall="<blockquote>" afterall="</blockquote>" showcontent=1 showexcerpt=0 ] [xilipostinpost query="attachment_id=1876" from="****-**-** 12:00" to="****-**-** 23:59" expired="this is morning" beforeall="<blockquote>" afterall="</blockquote>" showcontent=1 showexcerpt=0 ] |