xili Post in Post

xili-postinpost provides a triple toolkit to insert post(s) everywhere in webpage – outside or inside WP loop – . The displayed post(s) are resulting of queries (see codex) like those in WP loop but not interfere with main WP loop. Widget contains conditional syntax.
- Template tag function
xi_postinpost()– see source , - shortcode like
[xilipostinpost query="p=1"]or like<blockquote>[xilipostinpost query="cat=3,4,150&showposts=2&lang=en_us"]</blockquote>. -
A shortcode like
<blockquote>[xilipostinpost query="cat=3,4,150&showposts=2" lang="cur"]</blockquote>with paramlangset tocurgive a result according the current language (example: inside an undefined page displayed according browser language). -
and widget with powerful syntax for contextual display of query’s result.
are available for developers, authors and webmasters.
In widget (and template tag), if option is set, it is possible to choose display period and expiration date.
In widget – if xili-language plugin active – to combine a query and the current language use params like [query="cat=14" lang="cur"] with square bracket[] and lang set cur. Don’t put cur in query. See screenshot.
For each post of the resulting list, the displayed result is hightly customizable and can contain title, excerpt, content, thumbnail image with or without link to the post as single.
Paging is preserved even if a shortcode is used in a list of posts.
New with 1.7.02 :
- Last Updated 2019-05-20
- see tab and chapters in changelog
More infos
- Tested on WP mono and multisite mode.
Why this plugin ?
xili-postinpost is compromise between minimum php coding (but not accessible by everybody) and end-user tool (like widget) – but with lot of php lines in background – to afford flexibility for webmaster and data-designer for CMS. The core function of the plugin ( xi_postinpost() ) and its rich argument (array with lot params) was created 4 years ago to insert by example a recent news in header, a target post inside blockquote set in content of a page or a post. Doing a public version is like finishing a book. Remind that free code is not gratis, include fees in quotation for commercial use or clients and donate. For free use, send an email!
Are the queries recursive in widget ?
No, it is only possible to combine one true and another one if the first is false: the syntax is [condition=… query=…]:[query=…]. The second part can have is own condition as in screenshot 6.
Download & install the zip archive
The plugin package installer can be downloaded from the WP2E project tab called “code”.
1 – Select the version to download if this option is available otherwise the “latest” version of the main plugin will be used.
2 – After downloading the zip archive install the plugin package installer in you local environment and activate the script from the plugin list.
3 – Under the section “Plugins” of the admin dashboard you should see a new “Dependencies & Licenses” link. Follow the instructions from this panel to finalize the installation of the missing dependencies.
- Give a name to your project
- Download the Installer Package
- Install & activate the plugin locally
- Install the suggested dependencies
Tips: Use the WP2E panel to add/suggest new dependencies to the local installation. Press F5 in the list of dependencies if the changes are not displayed right away.



