The Execution of All Things
If you’re still modifying or hacking up Templates in order to embed custom wordpress functionality inside posts and pages you are way behind the times. Introducing the Execution of All Things plugin (wp-exec). This plugin for WordPress allows users to easily insert dynamic content insides posts or pages (and even include posts or pages within one another!) There is an entire slew of functionality already implemented but, best of all, it supports calling any wordpress function and embedding the output inside a post or page effortlessly.
Okay, so it sounds pretty cool in theory but what does that mean and what tags are currently implemented?
Samples and Examples
Please note that each function is only shown with one or two parameters at most. You should check out the projects page for a complete list of all parameters that can be used.
Date: This is a very simple example but you can easily embed the current date or time in any post or page.
<exec type="date" />
Tuesday February 07, 2012 at 6:34 pm
<exec type="date" format="m:d:Y g:ia" />
02:07:2012 6:34pm
Archives: This is probably the most common usage I found. Instead of faking the templates in order to include a list of archives using the <?php wp_get_archives(); ?> function — you can simply create a new page and embed:
<exec type="archives" />
- November 2010
- March 2009
- February 2009
- January 2009
- December 2008
- October 2008
- September 2008
- August 2008
- July 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- May 2004
- April 2004
- March 2004
- February 2004
- January 2004
- December 2003
- November 2003
- October 2003
- September 2003
- August 2003
<exec type="archives" mode="daily" limit="7" />
- Sunday November 28, 2010
- Sunday March 15, 2009
- Sunday February 01, 2009
- Thursday January 01, 2009
- Sunday December 28, 2008
- Friday October 03, 2008
- Saturday September 13, 2008
<exec type="archives" mode="monthly" count="true" />
- November 2010 (1)
- March 2009 (1)
- February 2009 (1)
- January 2009 (1)
- December 2008 (1)
- October 2008 (1)
- September 2008 (1)
- August 2008 (1)
- July 2008 (1)
- April 2008 (2)
- March 2008 (1)
- February 2008 (1)
- January 2008 (1)
- December 2007 (3)
- November 2007 (2)
- October 2007 (1)
- June 2007 (1)
- May 2007 (1)
- April 2007 (2)
- March 2007 (4)
- February 2007 (2)
- January 2007 (3)
- December 2006 (5)
- November 2006 (3)
- October 2006 (1)
- September 2006 (1)
- August 2006 (2)
- July 2006 (2)
- June 2006 (3)
- May 2006 (3)
- March 2006 (6)
- February 2006 (2)
- January 2006 (5)
- December 2005 (4)
- November 2005 (3)
- October 2005 (6)
- September 2005 (7)
- August 2005 (6)
- July 2005 (4)
- June 2005 (2)
- May 2005 (9)
- April 2005 (7)
- March 2005 (9)
- February 2005 (15)
- January 2005 (20)
- December 2004 (23)
- November 2004 (10)
- October 2004 (14)
- September 2004 (17)
- August 2004 (8)
- July 2004 (2)
- June 2004 (4)
- May 2004 (4)
- April 2004 (6)
- March 2004 (14)
- February 2004 (6)
- January 2004 (3)
- December 2003 (5)
- November 2003 (9)
- October 2003 (11)
- September 2003 (11)
- August 2003 (3)
Categories: Again another common usage would be listing all categories in a post or page.
<exec type="categories" />
Function: This tag will allow you to arbitrarily call any user defined functions (including any wordpress functions and even functions in activated plugins). Tres cool!
<exec type="function" name="pluginsUsedAsTable" />
<exec type="function" name="get_archives" params="postbypost, 20, html" />
Include: This, I think, is the neatest feature of this plugin. It facilitates dynamically including a post or page within one another. You can embed a post inside another post or vice-versa. You simply need to supply the tag the ID number of the post or page you are attempting to include. You can also embed other information by using the field tag (but by default the content is used).
<exec type="include" id="#" />
<exec type="include" id="#" field="excerpt" />
bloginfo: This tag simply gives you quick access to the global information regarding your wordpress installation.
<exec type="bloginfo" show="version" />
3.2.1
Finally, please note that archives and categories just like their PHP counterparts should be encapsulated by <ul> or <ol> in order to be displayed properly.
More Information
You can find more infromation and download this WordPress plugin (wp-exec) from http://www.navidazimi.com/projects/wp-exec/.
Enjoy!
Adieu. Navid.
Comments are closed
Comments are currently closed on this entry.