<?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/tag/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>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>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>

