<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SEOserpent &#187; WordPress</title>
	<atom:link href="http://seoserpent.com/blog/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://seoserpent.com</link>
	<description>A search marketing company.</description>
	<lastBuildDate>Mon, 06 Feb 2012 19:08:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Gravity Forms – 5 Digit Zip Codes &amp; State Abbreviations</title>
		<link>http://seoserpent.com/news/gravity-forms-zip-codes-state-abbreviations</link>
		<comments>http://seoserpent.com/news/gravity-forms-zip-codes-state-abbreviations#comments</comments>
		<pubDate>Mon, 21 Mar 2011 17:02:44 +0000</pubDate>
		<dc:creator>Marty Martin</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Gravity Forms]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://seoserpent.com/?p=424</guid>
		<description><![CDATA[Originally based on the code by Matthew Connerton on the Gravity Forms support site, I have modified his original code to also trim the zip code into the first 5 digits. Currently with Gravity Forms, there is no (easy) way to change the input fields to only accept 5 digits (or any other number) and/or [...]]]></description>
			<content:encoded><![CDATA[<p>Originally based on <a href="http://www.gravityhelp.com/forums/topic/abbreviate-city-fields#post-4368" rel="nofollow" target="_blank">the code</a> by <a href="http://www.webbusinessfreedom.com/" target="_blank">Matthew Connerton</a> on the <a href="http://mear.is/gravity">Gravity Forms</a> support site, I have modified his original code to also trim the zip code into the first 5 digits. </p>
<p>Currently with Gravity Forms, there is no (easy) way to change the input fields to only accept 5 digits (or any other number) and/or change the submitted state selection to their USPS equivalents.  If you&#8217;re trying to use your data to generate mailing labels or anything similar, the way it is setup can be messy and/or problematic.</p>
<p>Hence, the solution Mr. Connerton, and now myself, have developed.  It is written as a plugin so all you have to do is download the file below, unzip it and put it in your WordPress plugins folder.  It will then modify the submitted entry prior to it being saved to your database, and BAM!  You&#8217;re a happy camper.</p>
<p>So what does this plugin do in short? &#8211; </p>
<ul>
<li>Trim submitted zip codes to 5 digits</li>
<li>Convert full state names to their USPS state abbreviations</li>
</ul>
<p>Enjoy! > <a class="downloadlink" href="http://seoserpent.com/downloads/State+and+Zip+Code+Modifier+for+Gravity+Forms" title="Version1.1 downloaded 633 times" >State and Zip Code Modifier for Gravity Forms (633)</a></p>
<p><small>Note: the link to Gravity Forms only works if you&#8217;re logged in to their support forums.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://seoserpent.com/news/gravity-forms-zip-codes-state-abbreviations/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Weather Underground Plugin Expansion</title>
		<link>http://seoserpent.com/news/weather-plugin</link>
		<comments>http://seoserpent.com/news/weather-plugin#comments</comments>
		<pubDate>Tue, 05 Oct 2010 17:26:47 +0000</pubDate>
		<dc:creator>Marty Martin</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://seoserpent.com/?p=397</guid>
		<description><![CDATA[My favorite Denver SEO company Katz Web Services announced the release of their latest awesome plugin- WP Wunderground Plugin. It&#8217;s a well done, awesome plugin that allows you to use short codes to display the weather forecast in a widget or blog post. For one of my clients however, we wanted the weather to be [...]]]></description>
			<content:encoded><![CDATA[<p>My favorite <a href="http://www.seodenver.com/" target="_blank">Denver SEO</a> company Katz Web Services <a href="http://www.seodenver.com/wunderground/" target="_blank">announced</a> the release of their latest awesome plugin- <a href="http://wordpress.org/extend/plugins/wunderground/">WP Wunderground Plugin</a>.</p>
<p>It&#8217;s a well done, awesome plugin that allows you to use short codes to display the weather forecast in a widget or blog post.</p>
<p>For one of my clients however, we wanted the weather to be a part of the theme outside of a widget.</p>
<p>A small bit of code later, it&#8217;s done.  You can see the weather forecast for <a href="http://theroanoker.com/" target="_blank">Roanoke, VA</a> by clicking that link.</p>
<p>We installed the WP Wunderground Plugin and then added this bit of code to our theme file:</p>
<pre class="brush: php; title: ; notranslate">
&amp;lt;?php
if(class_exists(wp_wunderground)) :
	echo '&amp;lt;div id=&amp;quot;rkr_weather&amp;quot;&amp;gt;';
	$our_weather = new wp_wunderground;
	print $our_weather-&amp;gt;build_forecast('24012');
	echo '&amp;lt;/div&amp;gt;';
endif;
?&amp;gt;
</pre>
<p>Now, an explanation of what you see.</p>
<p>Line 2 is a conditional statement checking to see if the plugin is currently active by checking to see if the plugin&#8217;s class exists.  It wouldn&#8217;t exist if the plugin was active.  You could also use the WordPress function <code>is_plugin_active()</code> but I&#8217;ve run into a couple of instances where it returns an unknown function error.</p>
<p>Lines 3 &#038; 6 are simply creating a container <code>&laquo;div&raquo;</code> for styling purposes.</p>
<p>Lines 4 creates a new instance of the plugin class and Line 5 prints the result of the internal method <code>build_forecast()</code>.  The &#8217;24012&#8242; is the zip code I want the weather returned for and is also defined in the plugin settings.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://seoserpent.com/news/weather-plugin/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Get Your WordPress Multisite Blog Slug</title>
		<link>http://seoserpent.com/wordpress/multisite-blog-slug</link>
		<comments>http://seoserpent.com/wordpress/multisite-blog-slug#comments</comments>
		<pubDate>Thu, 23 Sep 2010 14:04:29 +0000</pubDate>
		<dc:creator>Marty Martin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[$GLOBALS]]></category>
		<category><![CDATA[get_blog_details]]></category>
		<category><![CDATA[wpmu]]></category>

		<guid isPermaLink="false">http://seoserpent.com/?p=374</guid>
		<description><![CDATA[I chose this subject to write about for two reasons. One: I&#8217;m sure there are folks out there who will find this useful. And Two: I can never remember it myself so by writing about it here, I won&#8217;t have to remember, I can just refer back to my own blog! Often, when using WordPress [...]]]></description>
			<content:encoded><![CDATA[<p>I chose this subject to write about for two reasons.  One: I&#8217;m sure there are folks out there who will find this useful.  And Two: I can never remember it myself so by writing about it here, I won&#8217;t have to remember, I can just refer back to my own blog!</p>
<p>Often, when using WordPress multisite as a content management system rather than a blog network, I have the need to use a blog slug in image paths, or when doing DB queries or whatever.  There are lots of reasons, but here&#8217;s how you get it ></p>
<pre class="brush: php; title: ; notranslate">
// This is one way
$blog_details =  get_blog_details($GLOBALS['blog_id']);
$slug = str_replace('/','',$blog_details-&gt;path);
echo $slug;

// This way makes more sense to me since there's already a global $var for the path
$slug = str_replace('/','',$GLOBALS['path']);
echo $slug;
</pre>
<p>I find the $GLOBALS variable to be really useful.  If you&#8217;d like to see all the stuff you can get out of there, just drop this line in your theme somewhere (it&#8217;s quite long, so best not to do it on a production site)-</p>
<pre class="brush: php; title: ; notranslate">
print_r($GLOBALS);
</pre>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://seoserpent.com/wordpress/multisite-blog-slug/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New WordPress Plugin: Stardate</title>
		<link>http://seoserpent.com/wordpress/new-plugin-stardate</link>
		<comments>http://seoserpent.com/wordpress/new-plugin-stardate#comments</comments>
		<pubDate>Wed, 08 Sep 2010 18:59:47 +0000</pubDate>
		<dc:creator>Marty Martin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Featured]]></category>

		<guid isPermaLink="false">http://seoserpent.com/?p=347</guid>
		<description><![CDATA[On September 8, 1966, Star Trek debuted in the United States on NBC. To honor the 44th anniversary, we have coded and released a novelty plugin for all of you Trekkies out there. The Stardate Plugin offers three core functionalities, the coolest of which is first: You know that publication date that shows up on [...]]]></description>
			<content:encoded><![CDATA[<p>On September 8, 1966, Star Trek debuted in the United States on NBC.  To honor the 44th anniversary, we have coded and released a novelty plugin for all of you Trekkies out there.</p>
<p>The <a href="/wordpress/stardate">Stardate Plugin</a> offers three core functionalities, the coolest of which is first:</p>
<ol>
<li>You know that publication date that shows up on your posts and pages?  Change it from the traditional calendar format to a STARDATE.  Oh yes.</li>
<li>Use our fancy shortcode to insert the current stardate in a post or page wherever you like.</li>
<li>Use our awesome function to integrate the stardate into your theme template anywhere you like.</li>
</ol>
<p>Here it is in action:</p>
<h1><strong>Today&#8217;s Stardate is <span class="stardate">11205.18</span></strong></h1>
<p>You can download the plugin from the WordPress repository <a href="http://wordpress.org/extend/plugins/stardate/" rel="nofollow">here</a>.  More information can be found on the official plugin page- <a href="/wordpress/stardate">Stardate</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://seoserpent.com/wordpress/new-plugin-stardate/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Gallery Shortcode</title>
		<link>http://seoserpent.com/wordpress/gallery-shortcode</link>
		<comments>http://seoserpent.com/wordpress/gallery-shortcode#comments</comments>
		<pubDate>Wed, 18 Aug 2010 13:17:42 +0000</pubDate>
		<dc:creator>Marty Martin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[gallery shortcode]]></category>
		<category><![CDATA[wordpress gallery]]></category>

		<guid isPermaLink="false">http://seoserpent.com/?p=292</guid>
		<description><![CDATA[Apparently this little gem has been around since WordPress 2.5 (and as of this writing we&#8217;re at 3.0.1) but I&#8217;m just now finding out about it. Good grief! Gallery Shortcode Tutorial So you want a fancy WordPress gallery without having to install a gallery plugin? Yes, you can do that. Easy. It&#8217;s as simple as [...]]]></description>
			<content:encoded><![CDATA[<p>Apparently this little gem has been around since WordPress 2.5 (and as of this writing we&#8217;re at 3.0.1) but I&#8217;m just now finding out about it.  Good grief!</p>
<h3>Gallery Shortcode Tutorial</h3>
<p>So you want a fancy WordPress gallery without having to install a gallery plugin?  Yes, you can do that.  Easy.</p>
<p>It&#8217;s as simple as the following steps:</p>
<ol>
<li>Start a new post (or edit an existing post)</li>
<li>Using the &#8220;Add an image&#8221; icon next to &#8220;Upload/Insert&#8221; above the WYSIWYG editor, add the images you want to display as a gallery on your post.  This is technically attaching images to the post.</li>
<li>Wherever you want your thumbnail gallery of images to appear, add the shortcode- <code>&#91;gallery&#93;</code></li>
</ol>
<p>And that&#8217;s pretty much it!  Easy right?  I told you so!</p>
<h3>Gallery Shortcode Options</h3>
<p>The &#91;gallery&#93; shortcode also has other options available naturally if you want to customize your WordPress gallery.</p>
<p>The basic options are pretty straight forward and include- columns, id, size.</p>
<p><code>&#91;gallery columns="2"&#93;</code><br />
The columns options, as you might imagine, sets the number of columns the gallery will have.  The default is 3 if you don&#8217;t specify a value.  If you set columns to 0, row breaks will <strong>not</strong> be included in the output.</p>
<p><code>&#91;gallery id="911"&#93;</code><br />
The id option allows you to pull images from a different post.  So if your image gallery you want to display is attached to another post, rather than reupload all those images, just specify the post id of the original post and you&#8217;re in business.</p>
<p><code>&#91;gallery size="large"&#93;</code><br />
The size option allows you to choose what image size you want to use in your gallery.  The default is &#8220;thumbnail&#8221; but you can also choose- medium, large and full.  (Those sizes of course are the image sizes in your gallery that your image is resized to when you upload, except full of course, which is the original image size.)</p>
<h3>Gallery Shortcode Advanced Options</h3>
<p>There are some other advanced options as well that let you control thumbnail order, including or excluding particular images from the gallery and XHTML output.  If you&#8217;re interested in those, I recommend you check out the <a href="http://codex.wordpress.org/Gallery_Shortcode">WordPress Codex</a>.</p>
<h3>Gallery Shortcode Example</h3>
<p>I uploaded a few photos to this post myself to show how this works.  So without further ado, here&#8217;s an example of the gallery shortcode.</p>
<p><a href='http://seoserpent.com/wordpress/gallery-shortcode/attachment/red-efts-hat' title='Red Efts'><img width="150" height="150" src="http://seoserpent.com/wp-content/uploads/2010/08/red-efts-hat-150x150.jpg" class="attachment-thumbnail" alt="A bunch of Red Efts in my hat" title="Red Efts" /></a><br />
<a href='http://seoserpent.com/wordpress/gallery-shortcode/attachment/red-eft-4' title='Red Eft'><img width="150" height="150" src="http://seoserpent.com/wp-content/uploads/2010/08/red-eft-4-150x150.jpg" class="attachment-thumbnail" alt="Smile for the camera!" title="Red Eft" /></a><br />
<a href='http://seoserpent.com/wordpress/gallery-shortcode/attachment/red-eft-3' title='Red Eft'><img width="150" height="150" src="http://seoserpent.com/wp-content/uploads/2010/08/red-eft-3-150x150.jpg" class="attachment-thumbnail" alt="This little guy is showing off his brilliant reddish orange terrestrial colors" title="Red Eft" /></a><br />
<a href='http://seoserpent.com/wordpress/gallery-shortcode/attachment/red-eft-2' title='Red Eft'><img width="150" height="150" src="http://seoserpent.com/wp-content/uploads/2010/08/red-eft-2-150x150.jpg" class="attachment-thumbnail" alt="He&#039;s coming for you" title="Red Eft" /></a><br />
<a href='http://seoserpent.com/wordpress/gallery-shortcode/attachment/red-eft-1' title='Red Eft semi-aquatic stage'><img width="150" height="150" src="http://seoserpent.com/wp-content/uploads/2010/08/red-eft-1-150x150.jpg" class="attachment-thumbnail" alt="Red Eft" title="Red Eft semi-aquatic stage" /></a></p>
<p>For the above gallery, I just used <code>&#91;gallery columns="2"&#93;</code>.</p>
<p>Hope you found this as interesting and useful as me!  And all these photos are copyrighted.  :)</p>
]]></content:encoded>
			<wfw:commentRss>http://seoserpent.com/wordpress/gallery-shortcode/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WPMU Sitewide Tags &#8211; Posts don&#8217;t show up?</title>
		<link>http://seoserpent.com/wordpress/wpmu-sitewide-tags</link>
		<comments>http://seoserpent.com/wordpress/wpmu-sitewide-tags#comments</comments>
		<pubDate>Sat, 06 Mar 2010 01:49:35 +0000</pubDate>
		<dc:creator>Marty Martin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wpmu]]></category>

		<guid isPermaLink="false">http://seoserpent.com/?p=123</guid>
		<description><![CDATA[I&#8217;m working on a new WordPress Mu site and am using Donncha&#8217;s fantastic Sitewide Tags Plugin to pull all the posts from across my network of blogs onto one master blog for indexing features across my site. One thing I didn&#8217;t realize however was that (at the moment) it only works on posts published AFTER [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a new WordPress Mu site and am using Donncha&#8217;s fantastic <a href="http://ocaoimh.ie/wordpress-mu-sitewide-tags/">Sitewide Tags Plugin</a> to pull all the posts from across my network of blogs onto one master blog for indexing features across my site.</p>
<p>One thing I didn&#8217;t realize however was that (at the moment) it only works on posts published AFTER you start using it.  If you&#8217;re like me you have 100s or 1000s or even more posts already in your network.</p>
<p>I stumbled across some code the other day that will iterate through your blogs and pull the existing posts into the new tags blog.  So <a href="http://colas.nahaboo.net/">Colas Nahaboo</a>, whoever you are, thanks for <a href="http://pastebin.com/fe375d1">this awesome bit of code</a>:</p>
<pre class="brush: php; title: ; notranslate">
$posts = $wpdb-&gt;get_col( &quot;SELECT ID FROM $wpdb-&gt;posts WHERE post_status = 'publish'&quot; );
if ( !empty($posts) ) {
    foreach ( $posts as $post ) {
        if($post != 1 &amp;&amp; $post != 2)
            sitewide_tags_post($post, get_post($post));
    }
}
</pre>
<p>The easy thing to do, is using the <a href="http://plugins.paidtoblog.com/wpmu-power-tools/">WPMU Power Tools plug-in</a>,  from Brian Freeman, run the above query exactly as it is across all blogs and within a few seconds all of your posts will be pulled in.  Easy!</p>
<p>Thanks to <a href="http://wpmututorials.com/">Andrea</a> and <a href="http://ocaoimh.ie/">Donncha</a> for tips over the past few days, I always appreciate the help.</p>
]]></content:encoded>
			<wfw:commentRss>http://seoserpent.com/wordpress/wpmu-sitewide-tags/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WPMU Site-wide Breadcrumbs</title>
		<link>http://seoserpent.com/wordpress/wpmu-sitewide-breadcrumbs</link>
		<comments>http://seoserpent.com/wordpress/wpmu-sitewide-breadcrumbs#comments</comments>
		<pubDate>Tue, 23 Feb 2010 16:05:03 +0000</pubDate>
		<dc:creator>Marty Martin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wpmu]]></category>

		<guid isPermaLink="false">http://seoserpent.com/?p=119</guid>
		<description><![CDATA[Kudos to Dimox for a great non-plugin WordPress function for creating breadcrumbs. For someone like me though, who is implementing a WordPress Mu site using &#8220;blogs&#8221; as content sections instead of the traditional community of blogs, I&#8217;d like to be able to have breadcrumbs that go more like this- Home (root uri) » Blog Home [...]]]></description>
			<content:encoded><![CDATA[<p>Kudos to Dimox for a great non-plugin <a href="http://dimox.net/wordpress-breadcrumbs-without-a-plugin/">WordPress function for creating breadcrumbs</a>.</p>
<p>For someone like me though, who is implementing a WordPress Mu site using &#8220;blogs&#8221; as content sections instead of the traditional community of blogs, I&#8217;d like to be able to have breadcrumbs that go more like this-</p>
<p>Home (root uri) » Blog Home (blog uri) » normal breadcrumbs</p>
<p>To accomplish this, I just made a few modifications to Dimox&#8217;s code and with the power of WordPress, Shazam!, it was done.</p>
<p>Here&#8217;s the chunk of code I added/modified (note, this code goes in your themes&#8217; functions.php file):</p>
<pre class="brush: php; title: ; notranslate">
// change the value of $home to your site's root URI (first level in the breadcrumbs)
$home = 'http://foo.com/';

// add two new variables for your blog info (second level in the breadcrumbs)

$blogURI = get_bloginfo('url');
$blogName = get_bloginfo('name');

// directly above the first line of code below in the original source, add the second row that references the new vars you've created  (for good measure I also nofollowed the home URI)

echo '&lt;a href=&quot;' . $home . '&quot; rel=&quot;nofollow&quot;&gt;' . $name . '&lt;/a&gt; ' . $delimiter . ' ';
/* if blog is home blog, don't display the blog name */
if ($blog_id != 1) {	echo '&lt;a href=&quot;' . $blogURI . '&quot;&gt;' . $blogName . '&lt;/a&gt; ' . $delimiter . ' '; }
</pre>
<p>And that&#8217;s it, now just do everything else as Dimox suggests on his site.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://seoserpent.com/wordpress/wpmu-sitewide-breadcrumbs/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Events Manager Plugin &#8211; Hack to display events by categories</title>
		<link>http://seoserpent.com/wordpress/events-manager-plugin</link>
		<comments>http://seoserpent.com/wordpress/events-manager-plugin#comments</comments>
		<pubDate>Mon, 15 Feb 2010 21:37:14 +0000</pubDate>
		<dc:creator>Marty Martin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[event manager]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://seoserpent.com/?p=113</guid>
		<description><![CDATA[I have a client who uses the Events Manager plugin by Davide Benini and Marcus Skyes to manage events on their site. Unfortunately, the plug-in doesn&#8217;t let you display events by category (which is weird, otherwise, why have the categories?) but anyway, I wrote/hacked together a custom function and WordPress shortcode today to display the [...]]]></description>
			<content:encoded><![CDATA[<p>I have a client who uses the <a href="http://davidebenini.it/wordpress-plugins/events-manager/">Events Manager plugin</a> by Davide Benini and Marcus Skyes to <a href="http://wordpress.org/extend/plugins/events-manager/">manage events</a> on their site.</p>
<p>Unfortunately, the plug-in doesn&#8217;t let you display events by category (which is weird, otherwise, why have the categories?) but anyway, I wrote/hacked together a custom function and WordPress shortcode today to display the events by category.</p>
<p>Now, I know there are going to be the naysayers who say &#8220;This code isn&#8217;t very pretty&#8221;.  Yeah, well maybe not but it works.  And if you can improve on it, DO!  I&#8217;m totally open to it.  For instance, the edit I did makes more than one query to the DB which isn&#8217;t optimal.</p>
<p>Okay, so without further ado, here it is.  Open up the file in your events-manager/ folder called &#8216;marcus-extras.php&#8217;.  Around line 264 you&#8217;ll find a function called dbem_get_category().  I added my custom function and shortcode right below it :</p>
<pre class="brush: php; title: ; notranslate">
define('DBEM_EVENTS_TBNAME', 'dbem_events');
</pre>
<p>And then:</p>
<pre class="brush: php; title: ; notranslate">
function dbem_display_categories() {
	global $wpdb;
	$categories_table = $wpdb-&gt;prefix.DBEM_CATEGORIES_TBNAME;
	$events_table = $wpdb-&gt;prefix.DBEM_EVENTS_TBNAME;
	$sql_categories = mysql_query(&quot;SELECT * FROM $categories_table ORDER BY category_id&quot;);
	while($category = mysql_fetch_assoc($sql_categories)) {
		extract($category);
		$events = mysql_query(&quot;SELECT * FROM $events_table WHERE event_category_id = '&quot;.mysql_real_escape_string($category_id).&quot;' ORDER BY event_start_date ASC&quot;);
		$category_list .= &quot;&lt;div class=\&quot;event\&quot;&gt;&quot;;
		$category_list .= &quot;&lt;h2&gt;$category_name&lt;/h2&gt;&quot;;
		while($event = mysql_fetch_assoc($events)) {
			extract($event);
			$start_date = date('m/d/Y',strtotime($event_start_date));
			$end_date = date('m/d/Y',strtotime($event_end_date));
			$category_list .= &quot;&lt;li&gt;Event: &lt;strong&gt;&lt;a href=\&quot;http://www.wilderness-adventure.com/camp-dates/?event_id=$event_id\&quot; title=\&quot;$event_name\&quot;&gt;$event_name&lt;/a&gt;&lt;/strong&gt;
					&lt;ul&gt;
						&lt;li&gt;Dates: $start_date - $end_date&lt;/li&gt;
					&lt;/ul&gt;&lt;/li&gt;&quot;;
		}
		$category_list .= &quot;&lt;/div&gt;&quot;;
	}
	echo $category_list;
}
add_shortcode('dbem_events_by_category', 'dbem_display_categories');
</pre>
<p>The shortcode is &#8211; [dbem_events_by_category] and you can just insert it into your post or page whereever you want it to go.</p>
<p>By default it outputs ALL events under ALL categories but you could hack it up pretty easily to only display one category, etc.  I may do that later if enough people ask for it but it&#8217;s not what I needed so, didn&#8217;t get done.  :)</p>
<p>Hope this helps some folks.  Let me know if you have any questions!</p>
]]></content:encoded>
			<wfw:commentRss>http://seoserpent.com/wordpress/events-manager-plugin/feed</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
	</channel>
</rss>

