<?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>Monday By Noon &#187; Workbench</title>
	<atom:link href="http://mondaybynoon.com/category/workbench/feed/" rel="self" type="application/rss+xml" />
	<link>http://mondaybynoon.com</link>
	<description>A resource for Web designers and developers to read about and discuss their craft.</description>
	<lastBuildDate>Mon, 06 Sep 2010 18:50:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WordPress Custom Post Types &amp; PHPurchase: Best Cart Ever – Part 2</title>
		<link>http://mondaybynoon.com/2010/08/09/wordpress-custom-post-types-phpurchase-cart-part-2/</link>
		<comments>http://mondaybynoon.com/2010/08/09/wordpress-custom-post-types-phpurchase-cart-part-2/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 05:28:09 +0000</pubDate>
		<dc:creator>Jonathan Christopher</dc:creator>
				<category><![CDATA[Favorites]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Workbench]]></category>
		<category><![CDATA[Custom Post Types]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[PHPurchase]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://mondaybynoon.com/?p=1197</guid>
		<description><![CDATA[After discussing the benefits of using WordPress 3.0+, Custom Post Types, and PHPurchase over other available e-commerce solutions, this article will walk you through the installation of PHPurchase and integration with Custom Post Types for your product listings.]]></description>
			<content:encoded><![CDATA[<p class="update">If you haven&#8217;t read <a href="http://mondaybynoon.com/2010/08/09/wordpress-custom-post-types-phpurchase-cart-part-1/">part 1</a> I took some time to outline why I feel that the combination of PHPurchase and Custom Post Types can result in the best e-commerce solution for WordPress.</p>
<p>In <a href="http://mondaybynoon.com/2010/08/09/wordpress-custom-post-types-phpurchase-cart-part-1/">part 1</a> I examined the current WordPress cart plugin landscape and outlined a number of reasons I feel that <a href="http://www.phpurchase.com/">PHPurchase</a> is currently the leading solution for an e-commerce solution, especially with the arrival of Custom Post Types. I&#8217;d like to share how and why using Custom Post Types works so well for a WordPress shopping cart.</p>
<h2>Setting up and prepping WordPress</h2>
<p>The first step will be to get your WordPress 3.0+ install up and running. That&#8217;s the extent of detail we&#8217;ll cover there. The next step will be to obtain and install a copy of <a href="http://www.phpurchase.com/">PHPurchase</a>. There are a number of purchase options available, but this walkthrough will cover functionality available under all licenses of PHPurchase.</p>
<p>The installation of PHPurchase is as straightforward as any other plugin. Once you&#8217;ve uploaded the plugin files and activated the plugin, you&#8217;ll need to enter your PHPurchase order number on the Settings screen:</p>
<p><img class="alignnone size-full wp-image-1198" title="cart.01.phpurchase.settings" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.01.phpurchase.settings.png" alt="Screenshot: PHPurchase settings" width="926" height="447" /></p>
<p>After validating your order number, the reminder to do so will disappear and you&#8217;ll be able to enter in your PayPal, Authorize.net, or Quantum Gateway payment settings. These details aren&#8217;t <em>required</em> at this point, but until that information is entered, the plugin won&#8217;t let you check out. For now, those are the only details we&#8217;ll cover as far as setup is concerned. Using the PHPurchase menu in the WordPress admin, you can begin adding products.</p>
<p><img class="alignnone size-full wp-image-1227" title="cart.02.phpurchase.add_.product.2" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.02.phpurchase.add_.product.2.png" alt="Screenshot: Adding a product to PHPurchase" width="926" height="724" /></p>
<p><img class="alignnone size-full wp-image-1200" title="cart.03.phpurchase.products" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.03.phpurchase.products.png" alt="Screenshot: PHPurchase product listing" width="953" height="245" /></p>
<p>As it stands PHPurchase will automatically implement a number of system Pages it will use to handle the cart view and checkout process for purchases.</p>
<p><img class="alignnone size-full wp-image-1202" title="cart.04.phpurchase.pages" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.04.phpurchase.pages_1.png" alt="Screenshot: PHPurchase default Pages" width="967" height="554" /></p>
<p>While these pages are an extremely important part of the overall e-commerce implementation, none of the products we just added are made available out of the box.</p>
<p><img class="alignnone size-full wp-image-1203" title="cart.05.store.no.products" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.05.store_.no_.products.png" alt="Screenshot: No products displayed in the WordPress theme" width="1128" height="842" /></p>
<p>By editing the Store page, you can quickly add a number of products using the PHPurchase icon in the editor toolbar:</p>
<p><img class="alignnone size-full wp-image-1204" title="cart.06.store.add.product.1" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.06.store_.add_.product.1.png" alt="Screenshot: Adding a product via PHPurchase, step 1" width="649" height="433" /></p>
<p><img class="alignnone size-full wp-image-1205" title="cart.07.store.add.product.2" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.07.store_.add_.product.2.png" alt="Screenshot: Adding a product via PHPurchase, step 2" width="582" height="347" /></p>
<p><img class="alignnone size-full wp-image-1206" title="cart.08.store.add.product.3" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.08.store_.add_.product.3.png" alt="Screenshot: Adding a product via PHPurchase, step 3" width="646" height="435" /></p>
<p><img class="alignnone size-full wp-image-1207" title="cart.09.store.one.product" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.09.store_.one_.product.png" alt="Screenshot: Product visible on Store page" width="1128" height="842" /></p>
<p>At this point, you can feel to proceed as normal. Using this Store page you could add every product you have available as well as apply some style and content using imagery, product copy, and links to relevant information. You could take it a step further and also create child pages with the Store as the parent and dedicate a product detail page to each of your products.</p>
<p>While helpful, you&#8217;ll quickly discover missing features that are very commonly found in other e-commerce platforms. Features such as browsing products by category and providing additional information about products in the form of multiple product shots and/or PDF downloads aren&#8217;t directly built into PHPurchase. The beauty lies in the fact that you can customize WordPress in all the usual ways to add these features as you see fit.</p>
<p>With the arrival of WordPress 3.0, however, there is an entire layer of additional functionality found in Custom Post Types that makes working with these features a breeze.</p>
<h2>Using Custom Post Types for your PHPurchase Store</h2>
<p><a href="http://codex.wordpress.org/Custom_Post_Types">Custom Post Types</a> are sometimes intimidating to more novice developers. Out of the box in WordPress 3.0 you need to manually register and set up your Custom Post Types. As with many developer-heavy tasks at hand, there is a plugin to make life easier when it comes to Custom Post Types; <a href="http://wordpress.org/extend/plugins/custom-post-type-ui/">Custom Post Type UI</a>.</p>
<p>Custom Post Type UI gives WordPress admins the ability to create, edit, and manage all of the Custom Post Types available within the WordPress Install:</p>
<p><img class="alignnone size-full wp-image-1210" title="cart.10.custom.post.type.add" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.10.custom.post_.type_.add_.png" alt="Screenshot: Adding a Custom Post via Custom Post Type UI" width="489" height="579" /></p>
<p>Using the plugin you can easily create a Custom Post Type to handle all of your product pages in PHPurchase. You&#8217;re able to customize the phrasing used throughout and viewing the Advanced Label Options gives you even more to work with. On top of these Custom Post Type Settings, you can also set up custom taxonomies which can be used in this specific case for a set of categories limited to your store products and separate from your Post categories.</p>
<p>Once you&#8217;ve created your Custom Post Type, a new menu item will be made available in the main navigation:</p>
<p><img class="alignnone size-full wp-image-1213" title="cart.11.custom.post.type.menu-1" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.11.custom.post_.type_.menu-1.png" alt="Screenshot: Custom Post Type Menu" width="156" height="334" /></p>
<p>Using the links available you can go ahead and set up your categories as well as add your products.</p>
<p><img class="alignnone size-full wp-image-1214" title="cart.12.custom.post.add.product" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.12.custom.post_.add_.product.png" alt="Screenshot: Adding a Custom Post Type product" width="949" height="775" /></p>
<p><img class="alignnone size-full wp-image-1215" title="cart.13.custom.post.products" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.13.custom.post_.products.png" alt="Screenshot: Products added to the Custom Post Type" width="953" height="457" /></p>
<p>Once your products have been added to your Custom Post Type, you can view the page on the front end:</p>
<p><img class="alignnone size-full wp-image-1216" title="cart.14.custom.product.in.theme" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.14.custom.product.in_.theme_.png" alt="Screenshot: Product page on website" width="1128" height="1745" /></p>
<h3>Integrating Custom Post Types into your Menu</h3>
<p>Now that your products have been added, you&#8217;ll want to make browsing your products as easy as possible. There are a number of things you can do, the primary two being including links to your product pages within your site navigation and using your Custom Post Type taxonomy (product categories).</p>
<p>Menus were also a big addition to WordPress in 3.0 and the update comes in handy at this point in our PHPurchase setup. The Menus are smart enough to recognize your Product Pages and allow you to integrate them directly within your site navigation:</p>
<p><img class="alignnone size-full wp-image-1217" title="cart.15.nav.menu" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.15.nav_.menu_.png" alt="Screenshot: Menus main screen" width="954" height="1054" /></p>
<p><img class="alignnone size-full wp-image-1218" title="cart.15.nav.menu.2" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.15.nav_.menu_.2.png" alt="Screenshot: Store navigation" width="647" height="695" /></p>
<p>Using the Menus you&#8217;re able to mix and match your Product Pages, your Product Categories, as well as your WordPress Pages themselves. You can custom build any structure you wish using the menus and the available entries. By default, linking to a Product Category will direct readers to pages resembling those of your other category pages, likely using category.php from your theme. You can customize this to any degree as you would normally when developing your custom WordPress theme.</p>
<p><img class="alignnone size-full wp-image-1219" title="cart.16.nav.menu.on.site" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.16.nav_.menu_.on_.site_.png" alt="Screenshot: Custom Store navigation" width="1128" height="783" /></p>
<h3>Integration with plugins</h3>
<p>Another significant advantage to using Custom Post Types and PHPurchase to power your WordPress based e-commerce website is the direct integration with many of your favorite plugins. One of the downfalls to a number of other WordPress store plugins is a lack of attention to search engine optimization. When working with product pages powered by Custom Post Types you can continue to use the SEO plugin working to optimize the rest of your website.</p>
<p>Additionally, you&#8217;ll be able to use plugins that enhance your ability to make additional product assets available to readers. Plugins like Attachments will let you add multiple product images for use in a product image viewer, PDFs including additional product details, as well as any available product details that may exist.</p>
<p><img class="alignnone size-full wp-image-1220" title="cart.17.plugins" src="http://mondaybynoon.com/wp-content/uploads/2010/08/cart.17.plugins.png" alt="Screenshot: Product page integration with plugins" width="951" height="886" /></p>
<h4>This is just the beginning</h4>
<p>These are just the basics of getting up and running with WordPress 3.0+, Custom Post Types, and <a href="http://phpurchase.com">PHPurchase</a> in an effort to get the best possible e-commerce shop up and running quickly and easily. While it&#8217;s a bit more work to get a large volume of products added and available on your website, I really feel that PHPurchase is a great choice when considering available e-commerce solutions for WordPress.</p>
]]></content:encoded>
			<wfw:commentRss>http://mondaybynoon.com/2010/08/09/wordpress-custom-post-types-phpurchase-cart-part-2/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Upgrading Pods to use TinyMCE instead of NicEdit</title>
		<link>http://mondaybynoon.com/2010/03/30/upgrading-pods-to-use-tinymce-instead-of-nicedit/</link>
		<comments>http://mondaybynoon.com/2010/03/30/upgrading-pods-to-use-tinymce-instead-of-nicedit/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 20:24:12 +0000</pubDate>
		<dc:creator>Jonathan Christopher</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Workbench]]></category>
		<category><![CDATA[Input Helper]]></category>
		<category><![CDATA[NicEdit]]></category>
		<category><![CDATA[Pods]]></category>
		<category><![CDATA[TinyMCE]]></category>

		<guid isPermaLink="false">http://mondaybynoon.com/?p=1044</guid>
		<description><![CDATA[WYSIWYG is trouble, but I've come to like TinyMCE the most out of anything. Pods has had one hand tied behind its back due to a the_editor() bug plaguing multiple instances of TinyMCE on the same page, but this quick Input Helper should help get us by until they're officially supported in core.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had my <a href="http://mondaybynoon.com/2008/11/10/i-have-a-huge-problem-with-wysiwyg-editors/">share of troubles with WYSIWYG</a> editors. I&#8217;ve had even more trouble with <a href="http://nicedit.com/">NicEdit</a>. Due to a <a href="http://core.trac.wordpress.org/ticket/11862">nasty little bug</a> in WordPress, <a href="http://podscms.org">Pods</a> hasn&#8217;t been able to use <a href="http://tinymce.moxiecode.com/">TinyMCE</a> as WordPress itself does.</p>
<p>NicEdit was frustrating clients left and right, but TinyMCE wasn&#8217;t. Some time ago I wrote a plugin that is in dire need of an upgrade called <a href="http://mondaybynoon.com/wordpress-post-notes/">Post Notes</a> that appended any number of WYSIWYG editors for any Post or Page and let you reference them as you wished. I was hoping I could use the same passive method of including TinyMCE in Pods that I had used for Post Notes.</p>
<p>WordPress has come along nicely since I first wrote that plugin, and I&#8217;m happy to say that I&#8217;ve come up with a working solution to upgrading your NicEdit WYSIWYG columns in Pods to use TinyMCE by adding an <a href="http://mondaybynoon.com/2010/03/22/input-helpers-pods-cms-wordpress/">Input Helper</a>. Here she is:</p>
<p class="single_link"><a class="download" href="http://podscms.org/packages/tinymce-for-paragraph-text/">TinyMCE for Paragraph Text</a></p>
<h2>Input Helper explained</h2>
<p>As a really brief walkthrough what the Input Helper does is modify the markup used to dump out the base <code>textarea</code> that holds our actual data. That&#8217;s the standard part. The exiting bit is contained in the conditional at the top of the Helper. The conditional basically checks to make sure that it&#8217;s not executed repeatedly for each Paragraph Text column used.</p>
<p>When the time is right the helper will fire <code>wp_tiny_mce()</code> which is a nearly undocumented WordPress function that resembles <code>wp_enqueue_script()</code> on steroids. It will pull in all the necessary scripts for TinyMCE as well as properly initialize them.</p>
<p>The first parameter dictates the TinyMCE theme to use. If set to <code>true</code> the full (advanced) theme will be used, setting it to <code>false</code> results in a stripped down (simple) theme which I prefer to use in this case. The <code>array</code> passed as the second parameter tells <code>wp_tiny_mce()</code> which <code>class</code> to hook, <strong>you do not need to edit it</strong>. The <a href="http://podscms.org/packages/tinymce-for-paragraph-text/">Package available for download</a> includes both a simple and an advanced TinyMCE Input Helper.</p>
<p>The JavaScript segment of this helper actually hijacks Pods&#8217; <code>saveForm()</code> function call as we need to force TinyMCE to fire <code>triggerSave()</code> which forces the TinyMCE content to be applied to our original <code>textarea</code> which is <strong>super important</strong>.</p>
<h3>Installation</h3>
<p>You can <a href="http://podscms.org/packages/tinymce-for-paragraph-text/">snag the TinyMCE Upgrade</a> Input Helper Package from the Pods website. Once downloaded, go ahead and log into the WordPress admin and hit the Package Manager link under the Pods heading:</p>
<p><img class="alignnone size-full wp-image-1045" title="01-package-manager" src="http://mondaybynoon.com/wp-content/uploads/2010/03/01-package-manager.jpg" alt="" /></p>
<p>Then you can hit the Import tab since we&#8217;re not Exporting anything:</p>
<p><img class="alignnone size-full wp-image-1046" title="02-import-tab" src="http://mondaybynoon.com/wp-content/uploads/2010/03/02-import-tab.jpg" alt="" /></p>
<p>Just paste the Helper in the provided text box and click Proceed to Confirmation</p>
<p><img class="alignnone size-full wp-image-1047" title="03-proceed" src="http://mondaybynoon.com/wp-content/uploads/2010/03/03-proceed.jpg" alt="" /></p>
<p>After Pods validates the Helper you can go ahead and Finalize:</p>
<p><img class="alignnone size-full wp-image-1048" title="04-finalize" src="http://mondaybynoon.com/wp-content/uploads/2010/03/04-finalize.jpg" alt="" /></p>
<p>Pods will let you know it&#8217;s <strong>All done!</strong> Your Input Helper is ready to go. Now you can browse to the Paragraph Text Column you&#8217;d like to edit which used to look like this:</p>
<p><img class="alignnone size-full wp-image-1049" title="05-nicedit" src="http://mondaybynoon.com/wp-content/uploads/2010/03/05-nicedit.jpg" alt="" /></p>
<p>and update the Input Helper field for the applicable column by first clicking the Edit icon next to your column and then defining the Input Helper by choosing <strong>tinymce</strong> from the <code>select</code>. <strong>Be sure to click Save</strong> to ensure the Input Helper is properly defined:</p>
<p><img class="alignnone size-full wp-image-1050" title="06-add-input-helper" src="http://mondaybynoon.com/wp-content/uploads/2010/03/06-add-input-helper.jpg" alt="" /></p>
<p>When you go back to edit your Pod, you&#8217;ll see a brandy new instance of TinyMCE instead of NicEdit:</p>
<p><img class="alignnone size-full wp-image-1051" title="07-tinymce" src="http://mondaybynoon.com/wp-content/uploads/2010/03/07-tinymce.jpg" alt="" /></p>
<p><strong>Please make sure</strong> you&#8217;re running the latest versions of both <a href="http://podscms.org">Pods</a> and <a href="http://ui.podscms.org">Pods UI</a> before working with this Input Helper.</p>
<h3>Known Issues</h3>
<p>I&#8217;m currently trying to work with <a href="http://twitter.com/sc0ttkclark">Scott Kingsley Clark</a> on a few details but there may be some problems with using this Input Helper along with a <a href="http://podscms.org/codex/publicform"><code>publicForm</code></a>. Please avoid using this Input Helper on any Pod you plan on using in conjunction with <code>publicForm</code> until it can be better tested. More info coming as soon as possible!</p>
<p><strong>Update</strong>: As of March 31, 2010 I can confirm that there is a problem with the Helper if your Pod has not been made Top Level and you&#8217;re not using Pods UI for the Pod. If at all possible, making it either Top Level or using Pods UI should achieve the desired results. We&#8217;ll keep working away at a fix ASAP!</p>
<p><strong>Update</strong>: Version 1.0.2 forces each editor instance to be of a certain height and also disables the resize handle due to it acting up in certain circumstances.</p>
]]></content:encoded>
			<wfw:commentRss>http://mondaybynoon.com/2010/03/30/upgrading-pods-to-use-tinymce-instead-of-nicedit/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Using Input Helpers in Pods CMS for WordPress</title>
		<link>http://mondaybynoon.com/2010/03/22/input-helpers-pods-cms-wordpress/</link>
		<comments>http://mondaybynoon.com/2010/03/22/input-helpers-pods-cms-wordpress/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 13:36:40 +0000</pubDate>
		<dc:creator>Jonathan Christopher</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Workbench]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[Input Helper]]></category>
		<category><![CDATA[Pages]]></category>
		<category><![CDATA[Pods]]></category>

		<guid isPermaLink="false">http://mondaybynoon.com/?p=1000</guid>
		<description><![CDATA[Input Helpers in Pods CMS for WordPress allow you to work with and manipulate the data available to your clients on a per-input-field basis. In this walkthrough we'll discuss limiting the WordPress Pages available in a Pick column as a method of applying a custom background image to the selected pages.]]></description>
			<content:encoded><![CDATA[<p>Pods CMS really aims to be a framework in the sense that you can do <strong>anything you want</strong> with it. The approach of the developers always seems to keep that in mind, which is sometimes the most difficult thing to do when writing software.</p>
<p>I&#8217;d like to review <a href="http://podscms.org/codex/input_helpers">Input Helpers</a> a bit. Out of the box, Pods offers a number of <a href="http://podscms.org/codex/column_types">column types</a> including date field, number, boolean, paragraph text, and more. We also can&#8217;t forget about one of the more unique column types offered; <a href="http://mondaybynoon.com/2010/01/11/how-to-use-pick-columns-relationships-in-pods/">Pick columns</a>.</p>
<h2>Applying Input Helpers to Pick columns</h2>
<p>On a recent project (like many projects) I found myself using a Pick column set to <code>WP Page</code> that automagically pulls a list of all WordPress Pages when the Pod entry form is displayed.</p>
<p><a href="http://mondaybynoon.com/wp-content/uploads/2010/03/01-pages-1.jpg"><img class="alignnone size-full wp-image-1012" title="01-pages-1" src="http://mondaybynoon.com/wp-content/uploads/2010/03/01-pages-1.jpg" alt="Setting up a WP Page Pick column in Pods" width="327" height="406" /></a></p>
<p>The goal with this Pod was to allow the client to dynamically define a background image for their website on a per-page basis. Out of the box, the solution worked as expected:</p>
<p><a href="http://mondaybynoon.com/wp-content/uploads/2010/03/02-stock-pod.jpg"><img class="alignnone size-full wp-image-1002" title="02-stock-pod" src="http://mondaybynoon.com/wp-content/uploads/2010/03/02-stock-pod.jpg" alt="The default output of a Pick column in Pods CMS" /></a></p>
<p>There was a problem though. I didn&#8217;t want the client to have full control over each and every page of the site. There were a number of pages on which it wouldn&#8217;t make sense to have a custom background. This is one of the many cases where <a href="http://podscms.org/codex/input_helpers">Input Helpers</a> come to the rescue.</p>
<h3>The basics of Input Helpers</h3>
<p>Input Helpers were designed to do one thing:</p>
<blockquote cite="http://podscms.org/codex/input_helpers"><p>An Input Helper lets you completely customize the appearance of any input field.</p>
</blockquote>
<p>What this means is we&#8217;re given the opportunity to both <em>hook</em> and <strong><em>manipulate</em></strong> the data pulled to an input field before it is displayed on screen. Input Helpers are applied on a <strong>per-column basis</strong> (as opposed to a Pod as a whole). The possibilities here are literally endless. If you have a requirement for the options available in an input field, Input Helpers are where you&#8217;d start.</p>
<p>As mentioned in <a href="http://podscms.org/codex/input_helpers">the Codex</a>, Input Helpers have a number of variables available to use. Each variable is well explained in the Codex, and depending on the column type, you can use and interact with each of these variables at your will in an effort to obtain your desired result.</p>
<p>Input Helpers are created using the Helpers tab in the admin panel. When naming your Input Helper, ensure the title is comprised of <strong>all lowercase (non-special) characters, no dashes, and no spaces</strong>. Also be sure to define the helper as <strong>Input</strong>.</p>
<p><a href="http://mondaybynoon.com/wp-content/uploads/2010/03/03-input-helper-init.jpg"><img class="alignnone size-full wp-image-1003" title="03-input-helper-init" src="http://mondaybynoon.com/wp-content/uploads/2010/03/03-input-helper-init.jpg" alt="Screenshot outlining how to create an Input Helper in Pods CMS" /></a></p>
<p>After the Helper is created, you&#8217;re provided with a code editor. Here&#8217;s where the magic happens. Using this editor, you can manipulate your data using a combination of straight PHP and the variables outlined in <a href="http://podscms.org/codex/input_helpers">the Codex</a>.</p>
<p>After you&#8217;re done writing the PHP needed to manipulate the values available in your input column, the last step is to actually <em>apply</em> the Helper to your Input:</p>
<p><a href="http://mondaybynoon.com/wp-content/uploads/2010/03/04-apply-helper.jpg"><img class="alignnone size-full wp-image-1004" title="04-apply-helper" src="http://mondaybynoon.com/wp-content/uploads/2010/03/04-apply-helper.jpg" alt="Applying an Input Helper to an input column in Pods CMS" /></a></p>
<p><strong>Note:</strong> due to AJAX, you&#8217;ll need to refresh the page <em>before</em> attempting to apply your Input Helper.</p>
<h3>Limiting WordPress Pages with an Input Helper</h3>
<p>Circling back to our single use case, we&#8217;ll go ahead and write a quick and dirty Input Helper that&#8217;s going to limit our WP Page Pick column to only a select few Pages I want to make available to my client. Writing an Input Helper might require a bit of initial legwork in inspecting the default markup used for the existing (out of the box) data available. In this example we&#8217;re working a multiple Pick, so the markup is as follows:</p>
<pre class="sh_html"><code>&lt;div class=&quot;leftside pages&quot;&gt;
  &lt;label for=&quot;pods_form0_pages&quot;&gt;
    Page(s)
    &lt;span class=&quot;red&quot;&gt;*&lt;/span&gt;
  &lt;/label&gt;
&lt;/div&gt;
&lt;div class=&quot;rightside pages&quot;&gt;
  &lt;div class=&quot;form pick pages&quot; id=&quot;pods_form0_pages&quot;&gt;
    &lt;div class=&quot;option&quot; value=&quot;2&quot;&gt;About&lt;/div&gt;
    ...
    &lt;div class=&quot;option&quot; value=&quot;18&quot;&gt;Team&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>
<p>The snippet has been truncated, but we can see how the Pick column is structured. We simply need to recreate that markup as we filter through the data supplied to the field:</p>
<pre class="sh_php"><code>&lt;?php
  $applicable_pages = array( 2, 31, 18, 23 );
?&gt;
&lt;div class=&quot;form pick &lt;?php echo $name; ?&gt;&quot;&gt;
  &lt;?php if ( !empty( $value ) ) : ?&gt;
    &lt;?php foreach ($value as $key =&gt; $val) : ?&gt;
      &lt;?php if( in_array( $val[&#x27;id&#x27;], $applicable_pages ) ) : ?&gt;

        &lt;?php
          $pagename = $val[&#x27;name&#x27;];
          $active= empty($val[&#x27;active&#x27;]) ? &#x27;&#x27; : &#x27; active&#x27;;
        ?&gt;
        &lt;div class=&quot;option&lt;?php echo $active; ?&gt;&quot; value=&quot;&lt;?php echo $val[&#x27;id&#x27;]; ?&gt;&quot;&gt;
          &lt;?php echo $pagename ; ?&gt;
        &lt;/div&gt;

      &lt;?php endif ?&gt;
    &lt;?php endforeach ?&gt;
  &lt;?php endif ?&gt;
&lt;/div&gt;</code></pre>
<p>What we&#8217;re doing with this Helper is first defining <code>$applicable_pages</code> which contains an array of the Page <code>ids</code> we&#8217;re permitting to show up for use. We then loop through <code>$value</code> (provided by Pods as per the Codex) and check to see if the current Page id is in our array. If it is, we&#8217;ll go ahead and make it available, else we move on to the next. What results is our refined list of available WordPress pages:</p>
<p><a href="http://mondaybynoon.com/wp-content/uploads/2010/03/05-refined-pages.jpg"><img class="alignnone size-full wp-image-1005" title="05-refined-pages" src="http://mondaybynoon.com/wp-content/uploads/2010/03/05-refined-pages.jpg" alt="Screenshot illustrating that our WP Page Pick column has indeed been filtered" /></a></p>
<p>A word of warning with this implementation: it&#8217;s tied to a single WordPress install. Additionally, problems will come up should the site be migrated to a new WordPress installation without a complete database export/import. WordPress Page ids are not retained using WordPress&#8217; import/export features. Keep that in mind as you write your Helpers.</p>
<h3>Input Helpers raise the bar</h3>
<p>Input Helpers open a ton of new doors when it comes to Pods. We&#8217;ve just scratched the surface with the example above, and as with pretty much anything &#8220;Pods&#8221; the possibilities are <strong>endless</strong>.</p>
<p>Another great resource you&#8217;ll want to bookmark is the <a href="http://podscms.org/packages/">Packages</a> section of the Pods CMS website. You can find a ton of available Helpers that have been made available by the community, some of which may come in handy straight away. The section isn&#8217;t limited to Helpers, but you can easily peruse the titles and poke around when you&#8217;ve got a minute.</p>
]]></content:encoded>
			<wfw:commentRss>http://mondaybynoon.com/2010/03/22/input-helpers-pods-cms-wordpress/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Building a Store Locator with WordPress and Pods</title>
		<link>http://mondaybynoon.com/2010/02/22/store-locator-wordpress-pods/</link>
		<comments>http://mondaybynoon.com/2010/02/22/store-locator-wordpress-pods/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 16:43:08 +0000</pubDate>
		<dc:creator>Jonathan Christopher</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Favorites]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Workbench]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[location]]></category>
		<category><![CDATA[Pods]]></category>
		<category><![CDATA[proximity]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://mondaybynoon.com/?p=835</guid>
		<description><![CDATA[I've always been curious about adding a location based proximity search powered by ZIP code and desired radius. It's actually quite easy to do using WordPress, Pods, and some crazy MySQL queries. This walkthrough shows you how to add a PHP/MySQL based store finder powered by WordPress and Pods.]]></description>
			<content:encoded><![CDATA[<p>Truth be told I was always a bit intimidated by proximity searches. That is to say the &#8220;Find <strong>X</strong> within <strong>Y</strong> miles&#8221; implementations we see everywhere. There was always a bit of magic behind how that worked and I&#8217;ve had a long time itch to figure out exactly how it worked.</p>
<p>Luckily enough, a client need came through which included such a feature. What better time to teach yourself something? Other programmers at my company had implemented proximity searches in the past, but I wasn&#8217;t involved on the projects and didn&#8217;t want to simply peruse their code and see what I could pull from it. I sat down with one of the guys as I began working on the feature to discuss past implementations. There were two ways to go about it:</p>
<ol>
<li>Piggyback on Google Maps</li>
<li>Do things the hard way</li>
</ol>
<p>It took me about zero seconds to determine that I wanted to do things the hard way. It&#8217;s not that I don&#8217;t enjoy working with Google Maps. Quite the contrary in fact. I just don&#8217;t want to depend on it too much in the day to day, especially for something as generic as a proximity search. Additionally, it just adds another layer of complexity with remote calls, API limits, and the other issues associated with using any other third party service. Hard way it is.</p>
<h2>Pods setup</h2>
<p>The first thing we&#8217;ll do is create a &#8216;stores&#8217; Pod. If you&#8217;re not familiar with creating Pods, take a few minutes to read the beginner series, starting with <a href="http://mondaybynoon.com/2010/01/04/pods-basics-installation-and-setup/">Pods Basics: Installation and Setup</a>. I&#8217;m going to use the following columns:</p>
<ul>
<li>name (txt)</li>
<li>slug (slug)</li>
<li>address (txt)</li>
<li>city (txt)</li>
<li>state (PICK state)</li>
<li>zipcode (txt)</li>
</ul>
<p>We&#8217;re also going to simply make this Pod a Top Level Menu. If you&#8217;re looking to make things even nicer, go ahead and <a href="http://mondaybynoon.com/2010/01/04/pods-ui-intro/">include Pods UI</a> where applicable.</p>
<p><a href="http://mondaybynoon.com/wp-content/uploads/2010/02/stores-pod-2.jpg"><img class="alignnone size-full wp-image-846" title="stores-pod-2" src="http://mondaybynoon.com/wp-content/uploads/2010/02/stores-pod-2.jpg" alt="" width="462" height="380" /></a></p>
<p>I&#8217;ve made every column required data, as an address isn&#8217;t very useful without complete information. I segmented the addresses as such simply because the proximity search I&#8217;ll be implementing is based on ZIP code, and having that data in a separate column will help with server load. Lastly, I chose to use a txt column for the <code>zipcode</code> instead of a Number because many ZIP codes begin with one (or more) zeros, which would cause a bit of trouble.</p>
<p>As a last step, we&#8217;ll go ahead and add a few test store listings using various ZIP codes you&#8217;re familiar with. The more variance the better, as you&#8217;ll be able to see whether the proximity aspect of the search is working properly or not.</p>
<p><a href="http://mondaybynoon.com/wp-content/uploads/2010/02/sample-single.jpg"><img class="alignnone size-full wp-image-840" title="sample-single" src="http://mondaybynoon.com/wp-content/uploads/2010/02/sample-single.jpg" alt="" width="551" height="267" /></a></p>
<p><a href="http://mondaybynoon.com/wp-content/uploads/2010/02/sample-listing.jpg"><img class="alignnone size-full wp-image-841" title="sample-listing" src="http://mondaybynoon.com/wp-content/uploads/2010/02/sample-listing.jpg" alt="" width="337" height="410" /></a></p>
<p>Once you&#8217;ve added a few samples, it&#8217;s time to integrate.</p>
<h2>WordPress setup</h2>
<p>For the sake of brevity, this location based search will sit on its own WordPress Page, using a template we&#8217;ll put together. We&#8217;ll continue working with the WordPress default theme, and add a new template; <code>store-locator.php</code> which includes the following:</p>
<pre class="sh_php"><code>&lt;?php

/* Template Name: Store Locator */

get_header(); ?&gt;

  &lt;div id="content" class="narrowcolumn" role="main"&gt;

    &lt;?php the_post(); ?&gt;
    &lt;div class="post" id="post-&lt;?php the_ID(); ?&gt;"&gt;
    &lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
      &lt;div class="entry"&gt;

        &lt;?php the_content(); ?&gt;

        &lt;form action="" method="post"&gt;

          &lt;p&gt;
            &lt;label for="mbn_zipcode"&gt;&lt;small&gt;Your ZIP&lt;/small&gt;&lt;/label&gt;
            &lt;input type="text" name="mbn_zipcode" id="mbn_zipcode" value="&lt;?php echo $_POST['mbn_zipcode']; ?&gt;" size="5" tabindex="1" /&gt;
          &lt;/p&gt;

          &lt;p&gt;
            &lt;label for="mbn_distance"&gt;&lt;small&gt;Within (miles)&lt;/small&gt;&lt;/label&gt;
            &lt;select name="mbn_distance" id="mbn_distance" tabindex="2"&gt;
              &lt;option value="5"&lt;?php if( empty( $_POST['mbn_distance'] ) || $_POST['mbn_distance'] == "5" ) : ?&gt; selected="selected"&lt;?php endif ?&gt;&gt;5&lt;/option&gt;
              &lt;option value="10"&lt;?php if( $_POST['mbn_distance'] == "10" ) : ?&gt; selected="selected"&lt;?php endif ?&gt;&gt;10&lt;/option&gt;
              &lt;option value="25"&lt;?php if( $_POST['mbn_distance'] == "25" ) : ?&gt; selected="selected"&lt;?php endif ?&gt;&gt;25&lt;/option&gt;
              &lt;option value="50"&lt;?php if( $_POST['mbn_distance'] == "50" ) : ?&gt; selected="selected"&lt;?php endif ?&gt;&gt;50&lt;/option&gt;
              &lt;option value="100"&lt;?php if( $_POST['mbn_distance'] == "100" ) : ?&gt; selected="selected"&lt;?php endif ?&gt;&gt;100&lt;/option&gt;
            &lt;/select&gt;
          &lt;/p&gt;

          &lt;p&gt;&lt;input name="submit" type="submit" id="submit" tabindex="3" value="Submit" /&gt;&lt;/p&gt;

        &lt;/form&gt;

      &lt;/div&gt;
    &lt;/div&gt;

  &lt;/div&gt;

&lt;?php get_sidebar(); ?&gt;

&lt;?php get_footer(); ?&gt;</code></pre>
<p>Nothing exciting happening here, we&#8217;re simply setting the stage with the basic form we&#8217;ll use to search our store directory by location.</p>
<p><a href="http://mondaybynoon.com/wp-content/uploads/2010/02/basic-form.jpg"><img class="alignnone size-full wp-image-842" title="basic-form" src="http://mondaybynoon.com/wp-content/uploads/2010/02/basic-form.jpg" alt="" width="497" height="182" /></a></p>
<p>Now that we&#8217;ve got our Page using our template, we&#8217;ll implement the location search functionality via Pods.</p>
<h2>Setting up the location search</h2>
<p>Our first step will be to add a conditional that checks to see if the form has been submitted. In this case, I&#8217;ll simply add a hidden <code>input</code> to track the current action:</p>
<pre class="sh_html"><code>&lt;input type="hidden" name="mbn_action" value="search" /&gt;</code></pre>
<p>With this action in place, we can include our conditional:</p>
<pre class="sh_php"><code>&lt;?php if( !empty( $_POST['mbn_action'] ) ) : ?&gt;
  &lt;p&gt;List our results&lt;/p&gt;
&lt;?php endif ?&gt;</code></pre>
<p>Here&#8217;s where everything happens. Once we find ourselves in the conditional, we&#8217;ll need to do a bit of work:</p>
<ol>
<li>Sanitize our data</li>
<li>Retrieve search results</li>
<li>Display data</li>
</ol>
<p>Our conditional will expand to be:</p>
<pre class="sh_php"><code>&lt;?php
  if( !empty( $_POST['mbn_action'] ) )
  {
    if( !is_numeric( $_POST['mbn_zipcode'] ) )
    {
      $the_zip = '0';
    }
    else
    {
      $the_zip = $_POST['mbn_zipcode'];
    }

    $the_distance = intval( $_POST['mbn_distance'] );

    $stores = mbn_get_stores_by_location( $the_zip, $the_distance );
    $stores_total = count( $stores );
  ?&gt;

    &lt;?php if( $stores_total &gt; 0 ) : ?&gt;
      &lt;h3&gt;Search Results&lt;/h3&gt;
      &lt;ol&gt;
        &lt;?php foreach( $stores as $store ) : ?&gt;
          &lt;?php $store_address = $store['address'] . ' ' . $store['city'] . ', ' . $store['state'][0]['name'] . ' ' . $store['zipcode'] ; ?&gt;
          &lt;li&gt;&lt;dl&gt;
            &lt;dt&gt;Name&lt;/dt&gt;&lt;dd&gt;&lt;?php echo $store['name']; ?&gt;&lt;/dd&gt;
            &lt;dt&gt;Address&lt;/dt&gt;&lt;dd&gt;&lt;?php echo $store_address; ?&gt;&lt;/dd&gt;
            &lt;dt&gt;Distance&lt;/dt&gt;&lt;dd&gt;&lt;?php echo $store['distance']; ?&gt; miles&lt;/dd&gt;
          &lt;/dl&gt;&lt;/li&gt;
        &lt;?php endforeach ?&gt;
      &lt;/ol&gt;
    &lt;?php endif ?&gt;

&lt;?php } ?&gt;</code></pre>
<p>You&#8217;ll notice that there&#8217;s no reference to Pods anywhere in that conditional, but there is a new function to take a look at; <code>mbn_get_stores_by_location()</code>.</p>
<h3>Implementing the proximity aspect</h3>
<p>This new function, <code>mbn_get_stores_by_location()</code>, will take care of all the work including:</p>
<ol>
<li>Determine the latitude and longitude of the source ZIP code</li>
<li>Use triginomitry to determine which additional ZIP codes fall within the chosen radius</li>
<li>Retrieve all Pods entries matching the pool of ZIP codes</li>
<li>Return an array of results, ordered by distance</li>
</ol>
<p>The quickest and easiest way to implement the function will be adding it to <code>functions.php</code> in your theme. Before we implement the function, however, you&#8217;ll need to add a new table to your database. This table is going to include a listing of all US-based ZIP codes and acts as an integral piece for this function. The table is used to determine the latitude and longitude of applicable ZIP codes, and is used with each search submission. There are a number of places to obtain a ZIP code database, the one I&#8217;ve used in the past is made available for free from <a href="http://www.populardata.com/zipcode_database.html">PopularData.com</a>. It&#8217;s made available as a <abbr title="Comma Separated Value">CSV</abbr> file weighing in at about 700k. There is a donation button available on the download page, and I&#8217;d suggest showing your appreciation to the provider should you use the database for any commercial work.</p>
<p>You&#8217;ll need to set up a new table in your WordPress database and be sure to name it something unique. You&#8217;ll need to remember both the table name and column names as you implement the location search. Once you&#8217;ve added the table and verified its integrity, we can go ahead and implement <code>mbn_get_stores_by_location()</code> in <code>functions.php</code>:</p>
<pre class="sh_php"><code>&lt;?php

function mbn_get_stores_by_location( $zip, $radius )
{
  global $wpdb;
  $radius = intval( $radius );

  // we first need to get the source coordinates
  $sql = "SELECT `latitude`, `longitude` FROM `mbn_zip_codes` WHERE `zipcode` = '$zip'";
  $coords = $wpdb-&gt;get_row( $sql );

  // now we'll get the other ZIP codes within the radius, ordered by distance
  $sql = "SELECT mbn_zip_codes.zipcode, ( 3959 * acos( cos( radians( $coords-&gt;latitude ) ) * cos( radians( mbn_zip_codes.latitude ) ) * cos( radians( mbn_zip_codes.longitude ) - radians( $coords-&gt;longitude ) ) + sin( radians( $coords-&gt;latitude ) ) * sin( radians( mbn_zip_codes.latitude ) ) ) )  AS distance FROM mbn_zip_codes HAVING distance &lt;= $radius OR distance IS NULL ORDER BY distance";

  $nearby_zips = $wpdb-&gt;get_results( $sql );

  // we need to store the zips in order to build the Pods query
  $target_zips = array();
  foreach ($nearby_zips as $nearby_zip)
  {
    array_push($target_zips, $nearby_zip-&gt;zipcode);
  }

  // we're going to store the results as we go
  $store_results = array();

  if( count( $target_zips &gt; 0 ) )
  {
    $final_target_zips = implode(',', $target_zips);

    if( strlen( $final_target_zips &gt; 0 ) )
    {
      // let's snag the data
      $stores = new Pod('stores');
      $stores-&gt;findRecords('id ASC', 9, 't.zipcode IN (' . $final_target_zips . ')');

      $store_data = array();

      while ( $stores-&gt;fetchRecord() )
      {
        $store_data['id']       = $stores-&gt;get_field('id');
        $store_data['name']     = $stores-&gt;get_field('name');
        $store_data['slug']     = $stores-&gt;get_field('slug');
        $store_data['address']  = $stores-&gt;get_field('address');
        $store_data['city']     = $stores-&gt;get_field('city');
        $store_data['state']    = $stores-&gt;get_field('state');
        $store_data['zipcode']  = $stores-&gt;get_field('zipcode');

        foreach ($nearby_zips as $nearby_zip)
        {
          if( $store_data['zipcode'] == $nearby_zip-&gt;zipcode )
          {
            $store_data['distance'] = intval( $nearby_zip-&gt;distance );
          }
        }

        array_push( $store_results, $store_data );
        unset( $store_data );
      }

      usort( $store_results, "mbn_cmp" );
    }

  }
    return $store_results;
}

?&gt;</code></pre>
<p>Quite a bit is going on in this function. Once our <code>globals</code> are set and our data sanitized, we&#8217;re going to query the new table we set up to retrieve the coordinates of the submitted ZIP code. Once we have those coordinates, we&#8217;re going to perform a lengthy query on that same table to determine what other ZIP codes fall within the submitted radius:</p>
<pre class="sh_sql"><code>SELECT mbn_zip_codes.zipcode, ( 3959 * acos( cos( radians( $coords-&gt;latitude ) ) * cos( radians( mbn_zip_codes.latitude ) ) * cos( radians( mbn_zip_codes.longitude ) - radians( $coords-&gt;longitude ) ) + sin( radians( $coords-&gt;latitude ) ) * sin( radians( mbn_zip_codes.latitude ) ) ) )  AS distance FROM mbn_zip_codes HAVING distance &lt;= $radius OR distance IS NULL ORDER BY distance</code></pre>
<p>You will need to be sure that table and column names are appropriately updated. There are a number of formulas which use trigonometry to solve proximity equations, but I&#8217;ve found the above to suit my needs well in this application.</p>
<p>Once we&#8217;ve got our nearby ZIP codes ordered by date, we query our Pod for any entries with ZIP codes that match our results. Instead of using <code>get_field()</code> to echo the display directly, we&#8217;ll instead use it to store the data in an <code>array</code> consisting of all returned results.</p>
<p>Once we&#8217;ve processed the results, our last step will be to use <a href="http://www.php.net/usort"><code>usort</code></a> to ensure our results are actually sorted by distance:</p>
<pre class="sh_php"><code>usort( $store_results, "mbn_cmp" );</code></pre>
<p><code>usort</code> uses a custom function to determine the comparison result, and we&#8217;ll need to add that to <code>functions.php</code> as well:</p>
<pre class="sh_php"><code>function mbn_cmp($a, $b)
{
  $a = intval( $a['distance'] );
  $b = intval( $b['distance'] );
  if( $a &lt; $b )
  {
    return -1;
  }
  elseif( $a &gt; $b )
  {
    return 1;
  }
  else
  {
    return 0;
  }
}</code></pre>
<p>Note that the comparison function uses a specific array key to generate a result. If you change the distance key, you&#8217;ll need to update this function as well.</p>
<p>That takes all the magic out of it. If we return to our submission form and search for a ZIP code that is known to produce results, we&#8217;ll see the functionality at work:</p>
<p><a href="http://mondaybynoon.com/wp-content/uploads/2010/02/results.jpg"><img class="alignnone size-full wp-image-843" title="results" src="http://mondaybynoon.com/wp-content/uploads/2010/02/results.jpg" alt="" width="445" height="540" /></a></p>
<p>I realize the explanation is a bit lengthy, but I hope it helps to explain how a proximity search can work on a smaller scale.</p>
<h3>Alternative implementations</h3>
<p>As I researched location based proximity searches, I found a number of alternative solutions using PHP and MySQL. Some of which included stored procedures, and other advanced uses of MySQL. I&#8217;m nearly positive other implementations would require less computing power and run a bit faster, but I chose not to take that path because I wanted to keep the functionality as lightweight and portable as possible.</p>
<p>The queries used in the search function are performing quite a bit of math, and probably won&#8217;t scale extremely well. If you&#8217;re only looking to implement a location search on a smaller set of data (under 10,000 or so) I think using something like this will work for you as well.</p>
<h3>Other uses</h3>
<p>With Pods making a location based ZIP code search so easy, I&#8217;m hoping to implement it on more client projects since it won&#8217;t affect the budget very much. Some initial use cases that come to mind are:</p>
<ul>
<li>Member directory searches</li>
<li>Service area searches</li>
<li>Geographic zone searches</li>
<li>Event listings</li>
</ul>
<p>The next step I&#8217;d take with an implementation such as this would be to remove the requirement of entering your ZIP code manually altogether and instead use <a href="http://en.wikipedia.org/wiki/Geoip">geolocation</a> to automatically generate a starting point for the visitor.</p>
]]></content:encoded>
			<wfw:commentRss>http://mondaybynoon.com/2010/02/22/store-locator-wordpress-pods/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>The Last of the Pods Basics: Pagination and Sorting</title>
		<link>http://mondaybynoon.com/2010/01/25/pods-pagination-sorting/</link>
		<comments>http://mondaybynoon.com/2010/01/25/pods-pagination-sorting/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 14:57:57 +0000</pubDate>
		<dc:creator>Jonathan Christopher</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Workbench]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Pods]]></category>
		<category><![CDATA[sorting]]></category>

		<guid isPermaLink="false">http://mondaybynoon.com/?p=736</guid>
		<description><![CDATA[To wrap up the Basics of Pods in January, I'd like to cover the last couple items I feel are almost essential in having the user experience of Pods come full circle for both you and your user. Pods offers both pagination and sorting out of the box, and each can be very helpful when it comes to working with the plugin.]]></description>
			<content:encoded><![CDATA[<p>The Series on Pods has been quite a success so far. I&#8217;ve had some back and forth with lots of new people who were itching to give Pods a try, and the series has been quite a bit of help to newcomers. I&#8217;m super happy about that, and I&#8217;d like to close out the initial push on the series with what I&#8217;ll call The Last of the Pods Basics. That is to say, I&#8217;d like to go over the last few bits that will really get you up and running with Pods in such a way that you can do even more with both your data as well as your user experience.</p>
<p>As a quick recap, if you haven&#8217;t read the first five articles in The Series, you will probably find this article a bit confusing. That said, please make sure you&#8217;ve read: <a href="http://mondaybynoon.com/2010/01/04/introduction-to-pods-cms-wordpress/">An Overview of and Introduction to Pods CMS for WordPress</a>, <a href="http://mondaybynoon.com/2010/01/04/pods-basics-installation-and-setup/">Pods Basics: Installation and Setup</a>, <a href="http://mondaybynoon.com/2010/01/04/pulling-pods-data/">Pods Basics: Pulling Pods Data to your Theme</a>, <a href="http://mondaybynoon.com/2010/01/04/pods-ui-intro/">Pods UI: The Latest and Greatest Addition to Pods</a>, and <a href="http://mondaybynoon.com/2010/01/11/how-to-use-pick-columns-relationships-in-pods/">How to use Pick Columns (Relationships) in Pods</a>. Being up to speed is essential with this article, as it&#8217;s going to build on the system we&#8217;ve put in place using the previously published articles. You won&#8217;t need to recreate the structure set up in the earlier walk throughs, but knowing the existing implementation will help these instructions remain clear.</p>
<h2>Paginated content in Pods</h2>
<p>Pods comes with pagination <em>built right in</em>, it&#8217;s just a matter of getting it to work the way you want. We&#8217;ll begin by flooding the Team Pod we set up previously with a large group of entries. In addition to the Pod setup, I also added <a href="http://mondaybynoon.com/2010/01/04/pods-ui-intro/">Pods UI</a> to help manage the content.</p>
<p><img src="http://mondaybynoon.com/images/pods/paging/01-team-listing.jpg" alt="Our new Team listing" /></p>
<p>If we were to check out our Team page now, we&#8217;d see that the listing has been limited to the <strong>default</strong> 15 records:</p>
<p><img src="http://mondaybynoon.com/images/pods/paging/02-limited-no-warning.jpg" alt="Team listing" /></p>
<p>Also by default, Pods doesn&#8217;t include any sort of warning that content wasn&#8217;t listed. It shouldn&#8217;t do that, because Pods does what you tell it to do. You have a few options here. The first would be to change the way we pull the original data. As it stands, we&#8217;re using:</p>
<pre class="sh_php"><code>&lt;?php
  $team = new Pod(&#x27;team&#x27;);
  $team-&gt;findRecords(&#x27;name ASC&#x27;);
?&gt;</code></pre>
<p>As it turns out, <a href="http://pods.uproot.us/codex/findrecords"><code>findRecords</code></a> has more parameters to work with, one of which is the <code>LIMIT</code> we want to use. You can change the default of 15 by defining the <code>$rows_per_page</code> parameter:</p>
<pre class="sh_php"><code>&lt;?php
  $team = new Pod(&#x27;team&#x27;);
  $team-&gt;findRecords(&#x27;name ASC&#x27;, 20);
?&gt;</code></pre>
<p>If we were to make that change, we&#8217;d see all 16 records we have entered, but would also have the same problem once we breached the new limit of 20. A better solution is to include pagination. We&#8217;ll revert back to the default limit of 15, and include our pagination links below the Team listing. It&#8217;s even easier than it sounds. After you&#8217;ve defined your Pod, you can fire the following anywhere:</p>
<pre class="sh_php"><code>&lt;?php echo $team-&gt;getPagination(); ?&gt;</code></pre>
<p><code>getPagnination()</code> basically takes care of everything, and will include the pagination controls where <code>echo</code>&#8216;d:</p>
<p><img src="http://mondaybynoon.com/images/pods/paging/03-pagination.jpg" alt="Pagination controls" /></p>
<p>Here&#8217;s the best part, <strong>that&#8217;s all you&#8217;ve got to do</strong>. Clicking the second page appends a couple of <code>$_GET</code> variables, reloads the page, and shows you all of your new data. <em>You&#8217;re done</em>. There are a few more details concerning <a href="http://pods.uproot.us/codex/getpagination"><code>getPagination()</code></a> which will be covered in a subsequent article.</p>
<h2>Sorting Pods entries</h2>
<p>I&#8217;m really excited that the Pods developers are taking so much care with <a href="http://mondaybynoon.com/2010/01/04/pods-ui-intro/">Pods UI</a>. Beyond the inherent user experience improvements it makes, they&#8217;re adding features that you can&#8217;t even find in WordPress yet. One of my most welcomed additions as of late with Pods UI is the inclusion of drag and drop sorting of Pods entries. Before the functionality was implemented, you had to make a <code>number</code> column in your Pod, and instruct users to use that field to manually order the Pods entries. It was a replication of the limited functionality WordPress offers with Pages. The Pods developers did one better and included such functionality in <a href="http://ui.podscms.org/">Pods UI</a>. As with every other aspect of Pods, it&#8217;s <em>super easy to integrate</em>, we&#8217;ll walk through it quickly.</p>
<p>The first step carries over from the old way of doing things, you&#8217;ll need to add a <code>number</code> column to your Pod. We&#8217;ll continue working with our Team Pod:</p>
<p><img src="http://mondaybynoon.com/images/pods/sorting/01-displayorder-col.jpg" alt="Adding our number column" /></p>
<p>Once the column is added, we&#8217;re going to need to modify our theme template to <code>ORDER BY</code> that column as opposed to the <code>name</code> column it&#8217;s currently using:</p>
<pre class="sh_php"><code>&lt;?php
  $team = new Pod(&#x27;team&#x27;);
  $team-&gt;findRecords(&#x27;displayorder ASC&#x27;);
  $total_members = $team-&gt;getTotalRows();
?&gt;</code></pre>
<p>Easy enough. You could actually leave things as is, and your user could manually edit each of the <code>displayorder</code> columns for each Pod entry, but Pods UI makes that so much easier. We&#8217;ll need to modify our custom UI plugin and include a few choice flags that will tell Pods UI the details it needs to enable drag and drop sorting. Our <strong>revised</strong> plugin is as follows:</p>
<pre class="sh_php"><code>&lt;?php
/*
Plugin Name: Team Pods UI
Plugin URI: http://example.com/
Description: Customized Pods UI
Version: 0.1
Author: Jonathan Christopher
Author URI: http://jchristopher.me/
*/

function pods_ui_team()
{
  $icon = &#x27;&#x27;;
  add_object_page(&#x27;Team&#x27;, &#x27;Team&#x27;, &#x27;read&#x27;, &#x27;team&#x27;, &#x27;&#x27;, $icon);
  add_submenu_page(&#x27;team&#x27;, &#x27;Team&#x27;, &#x27;Team&#x27;, &#x27;read&#x27;, &#x27;team&#x27;, &#x27;team_page&#x27;);
}

function team_page()
{
  $object = new Pod(&#x27;team&#x27;);
  $add_fields = $edit_fields = array(
        &#x27;name&#x27;,
        &#x27;position&#x27;,
        &#x27;photo&#x27;,
        &#x27;bio&#x27;,
        &#x27;permalink&#x27;,
        &#x27;eom&#x27;);
  $object-&gt;ui = array(
        &#x27;title&#x27;   =&gt; &#x27;Team&#x27;,
        &#x27;reorder&#x27; =&gt; &#x27;displayorder&#x27;,
        &#x27;reorder_columns&#x27; =&gt; array(
             &#x27;name&#x27;      =&gt; &#x27;Name&#x27;,
             &#x27;position&#x27;  =&gt; &#x27;Position&#x27;),
        &#x27;columns&#x27; =&gt; array(
             &#x27;name&#x27;      =&gt; &#x27;Name&#x27;,
             &#x27;position&#x27;  =&gt; &#x27;Position&#x27;,
             &#x27;created&#x27;   =&gt; &#x27;Date Created&#x27;,
             &#x27;modified&#x27;  =&gt; &#x27;Last Modified&#x27;
             ),
        &#x27;add_fields&#x27;  =&gt; $add_fields,
        &#x27;edit_fields&#x27; =&gt; $edit_fields
		);
  pods_ui_manage($object);
}

add_action(&#x27;admin_menu&#x27;,&#x27;pods_ui_team&#x27;);

?&gt;</code></pre>
<p>While it looks very similar to the Pods UI plugin we developed earlier, you&#8217;ll want to note the subtle difference:</p>
<pre class="sh_php"><code>&#x27;reorder&#x27; =&gt; &#x27;displayorder&#x27;,
&#x27;reorder_columns&#x27; =&gt; array(
     &#x27;name&#x27;      =&gt; &#x27;Name&#x27;,
     &#x27;position&#x27;  =&gt; &#x27;Position&#x27;),</code></pre>
<p>These new entries are very important, as they enable the sorting itself, as well as tell Pods which column to use when applying the new sort order. When you break it down it&#8217;s quite simple. You define <code>reorder</code> with the <code>number</code> column you set up and would like to use to control the sort order, and <code>reorder_columns</code> are the table columns that appear on the reorder page in the WordPress admin. After modifying your plugin with the following, a new element will be included on the listing page:</p>
<p><img src="http://mondaybynoon.com/images/pods/sorting/02-reorder-button.jpg" alt="Our new Reorder button" /></p>
<p>Clicking that button will reload the page and bring the user to a page dedicated to managing the order of the Pods entries:</p>
<p><img src="http://mondaybynoon.com/images/pods/sorting/03-reorder-page.jpg" alt="Our new Reorder page" /></p>
<p><strong>Beautiful!</strong> Our user can drag and drop to reorder their entries on the fly, click Update Order at the bottom, and everything is taken care of for us.</p>
<h2>Pods never disappoints</h2>
<p>I hope that these last couple basic features give you enough information to really get started working with Pods. The developers have really put a lot of time, effort, love, <strong>and thought</strong> into the implementation and I can&#8217;t thank them enough. If you&#8217;ve found yourself embracing Pods, please take a moment and <a href="http://pods.uproot.us/">donate to the project</a> as I know for a fact they&#8217;re working night and day to make Pods that much better with every release.</p>
<h4>The Pods CMS Series on <abbr title="Monday By Noon">MBN</abbr></h4>
<p>This article is the <strong>sixth</strong> in a series for Monday By Noon dedicated to <a href="http://pods.uproot.us/">Pods CMS</a>.</p>
<ol>
<li><a href="http://mondaybynoon.com/2010/01/04/introduction-to-pods-cms-wordpress/">An Overview of and Introduction to Pods CMS for WordPress</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pods-basics-installation-and-setup/">Pods Basics: Installation and Setup</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pulling-pods-data/">Pods Basics: Pulling Pods Data to your Theme</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pods-ui-intro/">Pods UI: The Latest and Greatest Addition to Pods</a></li>
<li><a href="http://mondaybynoon.com/2010/01/11/how-to-use-pick-columns-relationships-in-pods/">How to use Pick Columns (Relationships) in Pods</a></li>
<li><a href="http://mondaybynoon.com/2010/01/25/pods-pagination-sorting/">The Last of the Pods Basics: Pagination and Sorting</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://mondaybynoon.com/2010/01/25/pods-pagination-sorting/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>How to use Pick Columns (Relationships) in Pods</title>
		<link>http://mondaybynoon.com/2010/01/11/how-to-use-pick-columns-relationships-in-pods/</link>
		<comments>http://mondaybynoon.com/2010/01/11/how-to-use-pick-columns-relationships-in-pods/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 14:57:44 +0000</pubDate>
		<dc:creator>Jonathan Christopher</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Workbench]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[Pick columns]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Pods]]></category>
		<category><![CDATA[relationships]]></category>

		<guid isPermaLink="false">http://mondaybynoon.com/?p=722</guid>
		<description><![CDATA[Pods Pick columns help you create relationships with WordPress objects or other Pods themselves. It's a great way to bring the content management offered by Pods to the next level.]]></description>
			<content:encoded><![CDATA[<p>In this edition of the Pods CMS Series, we&#8217;re going to cover Pick Columns. If you haven&#8217;t read the first articles in the series, I would highly recommend it as this article assumes basic knowledge of the workings of <a href="http://pods.uproot.us/">Pods</a>. Please make sure you&#8217;ve read <a href="http://mondaybynoon.com/2010/01/04/pods-basics-installation-and-setup/">Pods Basics: Installation and Setup</a>, <a href="http://mondaybynoon.com/2010/01/04/pulling-pods-data/">Pods Basics: Pulling Pods Data to your Theme</a>, and <a href="http://mondaybynoon.com/2010/01/04/pods-ui-intro/">Pods UI: The Latest and Greatest Addition to Pods</a> before continuing.</p>
<p>As defined by the Pods developers:</p>
<blockquote cite="http://pods.uproot.us/codex/pick_column">
<p>A relationship column is essentially a select list containing items from the related type. If you create a column in one pod that relates to another pod, &#8220;event&#8221;, then in the edit form you&#8217;ll see a select list with all &#8220;event&#8221; items.</p>
</blockquote>
<p>This is really great for us, because it means that any Pod can effectively make use of another Pod or WordPress resource such as a Page. It opens the doors to quite a few things that were more difficult to achieve using a combination of standalone WordPress plugins.</p>
<h2>When would you want to use relationships?</h2>
<p>When it comes to learning, I always find it better to explore by example. If a technology is applied to a real-life situation (or something very close to that) I find it much easier to fully understand.</p>
<p>Perhaps the most basic use of a Pick column would be to make a link between a Pod entry and a WordPress Page. One example of a situation in which this makes sense is a promotional area. Using Pods, you could set up an area to manage any number of promotions, and have them link directly to a specific WordPress Page.</p>
<h2>How to implement a Pick Column</h2>
<p>We&#8217;ll continue with our Promotions example and create a quick Pod to handle the data. We&#8217;ll set it up like this:</p>
<p><img src="http://mondaybynoon.com/images/pods/pick/01-pick-setup.jpg" alt="Setting up our Pick column in Pods" /></p>
<p>With our Promotions Pod set up, let&#8217;s add a sample entry to see how the Pick column works:</p>
<p><img src="http://mondaybynoon.com/images/pods/pick/02-pick-entry.jpg" alt="Data entry for a Pick column" /></p>
<p>It&#8217;s as easy as that! Pods will automatically pull the active list of WordPress pages, so you don&#8217;t have to worry about anything being out of date or inaccurate when it comes to pulling the needed permalink on the front end. Once we&#8217;ve saved the Pod entry, let&#8217;s go ahead and integrate it into our sidebar. For the demo, I&#8217;m just going to work within the default WordPress theme. In <code>sidebar.php</code>:</p>
<pre class="sh_php"><code>&lt;?php
  $promos = new Pod(&#x27;promotion&#x27;);
  $promos-&gt;findRecords(null, 1);
  $total_promos = $promos-&gt;getTotalRows();
?&gt;

&lt;?php if( $total_promos &gt; 0 ) : ?&gt;

  &lt;?php while ( $promos-&gt;fetchRecord() ) : ?&gt;

    &lt;?php
      // set our variables
      $promo_name = $promos-&gt;get_field(&#x27;name&#x27;);
      $promo_copy = $promos-&gt;get_field(&#x27;copy&#x27;);
      $promo_link = $promos-&gt;get_field(&#x27;link&#x27;);

      $promo_link = get_permalink($promo_link[0][&#x27;ID&#x27;]);
    ?&gt;

    &lt;div id=&quot;promo&quot;&gt;
      &lt;h4&gt;&lt;?php echo $promo_name; ?&gt;&lt;/h4&gt;
      &lt;p&gt;&lt;?php echo $promo_copy; ?&gt;&lt;/p&gt;
      &lt;p&gt;&lt;a href=&quot;&lt;?php echo $promo_link; ?&gt;&quot;&gt;Find out more!&lt;/a&gt;&lt;/p&gt;
    &lt;/div&gt;
    &lt;!-- /promo --&gt;

  &lt;?php endwhile ?&gt;

&lt;?php endif ?&gt;</code></pre>
<p>What we&#8217;re doing here is first pulling our Pod data. If a record is found, we&#8217;re going to process it. Everything is standard practice until it comes to our Pick column. Since we chose the relationship to be a WordPress page, Pods is going to give us an array with which to work. What&#8217;s great is that the array consists of variables we&#8217;re already familiar with by working with WordPress pages. We&#8217;re provided the entire set of data we expect:</p>
<pre><code>Array
(
    [0] => Array
        (
            [ID] => 29
            [post_author] => 1
            [post_date] => 2010-01-01 00:00:00
            [post_date_gmt] => 2010-01-01 00:00:00
            [post_content] =>
            [post_title] => Package 3
            [post_excerpt] =>
            [post_status] => publish
            [comment_status] => open
            [ping_status] => open
            [post_password] =>
            [post_name] => package-3
            [to_ping] =>
            [pinged] =>
            [post_modified] => 2010-01-01 00:00:00
            [post_modified_gmt] => 2010-01-01 00:00:00
            [post_content_filtered] =>
            [post_parent] => 23
            [guid] => http://localhost/wp/?page_id=29
            [menu_order] => 0
            [post_type] => page
            [post_mime_type] =>
            [comment_count] => 0
        )

)</code></pre>
<p>Nice, right? Using that data we can completely integrate the Promotion copy to include a link directly to the page selected in the Pick column. Done, and done:</p>
<p><img src="http://mondaybynoon.com/images/pods/pick/03-in-sidebar.jpg" alt="Promotion on the front end" /></p>
<p>By all means, that&#8217;s the most basic way to implement the promotion, you can provide additional fields that allow the user to define the promo link text and more.</p>
<h3>Creating relationships with other Pods</h3>
<p>Being able to make a connection with a WordPress Page is <em>awesome</em>, you can also establish these relationships with WordPress Posts, WordPress Users, and even WordPress Categories. Pods also lets you link your Pods to one another. Let&#8217;s continue with our Promotion example.</p>
<p>Perhaps the website you&#8217;re building out has <strong>a lot</strong> of promotions. So many that you&#8217;d like to randomly pull a promotion from a group of promotions at any given time. With Pick columns we can make that happen. The first thing we&#8217;ll do is set up a Promotion Categories Pod. All we need is the most basic structure to work with:</p>
<p><img src="http://mondaybynoon.com/images/pods/pick/04-categories.jpg" alt="Promotion Categories Pod setup" /></p>
<p>Then we&#8217;ll add a couple categories, one of which can be Winter Specials:</p>
<p><img src="http://mondaybynoon.com/images/pods/pick/05-winter-specials.jpg" alt="Adding a promo category" /></p>
<p>Once our categories are added, we&#8217;ll need to add another Pick column to our original Promotions Pod:</p>
<p><img src="http://mondaybynoon.com/images/pods/pick/06-add-category-pick.jpg" alt="Revising our Promotions Pod" /></p>
<p>The last step on the setup side of things will be to add a few promos and categorize them:</p>
<p><img src="http://mondaybynoon.com/images/pods/pick/07-add-winter-special.jpg" alt="Adding a Winter Special" /></p>
<p>Once we have our new categorized library of promotions, we can go ahead and revise our sidebar to include only those categorized as being for the winter. To do so, we&#8217;re going to use a specific SQL syntax provided by Pods:</p>
<pre class="sh_php"><code>&lt;?php
  $promos = new Pod(&#x27;promotion&#x27;);
  $promos-&gt;findRecords(&#x27;rand()&#x27;, 1, &#x27;category.name = &quot;Winter Specials&quot;&#x27;);
  $total_promos = $promos-&gt;getTotalRows();
?&gt;

&lt;?php if( $total_promos &gt; 0 ) : ?&gt;

  &lt;?php while ( $promos-&gt;fetchRecord() ) : ?&gt;

    &lt;?php
      // set our variables
      $promo_name = $promos-&gt;get_field(&#x27;name&#x27;);
      $promo_copy = $promos-&gt;get_field(&#x27;copy&#x27;);
      $promo_link = $promos-&gt;get_field(&#x27;link&#x27;);

      $promo_link = get_permalink($promo_link[0][&#x27;ID&#x27;]);
    ?&gt;

    &lt;div id=&quot;promo&quot;&gt;
      &lt;h4&gt;&lt;?php echo $promo_name; ?&gt;&lt;/h4&gt;
      &lt;p&gt;&lt;?php echo $promo_copy; ?&gt;&lt;/p&gt;
      &lt;p&gt;&lt;a href=&quot;&lt;?php echo $promo_link; ?&gt;&quot;&gt;Find out more!&lt;/a&gt;&lt;/p&gt;
    &lt;/div&gt;
    &lt;!-- /promo --&gt;

  &lt;?php endwhile ?&gt;

&lt;?php endif ?&gt;</code></pre>
<p>The change to notice here is the <code>WHERE</code> bit we&#8217;ve added to the <code>findRecords()</code> function call. That statement restricts the results to have a chosen category of Winter Specials in our Pick column. Tied in with the <code>ORDER BY rand()</code> snippet, we have a rotating, random, categorized set of promotions from which to pull.</p>
<p>Again, this is just a most basic implementation of relating one Pod to another, but it really opens up the door for lots of options when it comes to content management!</p>
<h4>Integration with Pods UI</h4>
<p>When writing <a href="http://mondaybynoon.com/2010/01/04/pods-ui-intro/">Pods UI: The Latest and Greatest Addition to Pods</a> I did my best to convey how helpful <a href="http://ui.podscms.org/">Pods UI</a> is when it comes to presenting Pods to actual users. Your Pods are presented in such a way that the user recognizes the structure you&#8217;ve set up even quicker than before, and you&#8217;re able to better organize that presentation. Pick columns raise that bar even higher.</p>
<p>Before Pods UI, it was a bit cumbersome to explain how one Pod was related to another when Pick columns were involved. Now, with Pods UI, you can group related Pods into the same section in the navigation, providing a visual link between the two (or more) for the user. Circling back to our promotions example, we can now group the Promotions Pod itself alongside the Promotion Categories for easy maintenance:</p>
<p><img src="http://mondaybynoon.com/images/pods/pick/08-pods-ui.jpg" alt="Custom Pods UI for our promos" /></p>
<p>To get this listing, simply install Pods UI, and create your own separate plugin file:</p>
<pre class="sh_php"><code>&lt;?php
/*
Plugin Name: Promotions Pods UI
Plugin URI: http://example.com/
Description: Customized Pods UI
Version: 0.1
Author: Jonathan Christopher
Author URI: http://jchristopher.me/
*/

function pods_ui_promos()
{
  $icon = &#x27;&#x27;;
  add_object_page(&#x27;Promos&#x27;, &#x27;Promos&#x27;, &#x27;read&#x27;, &#x27;promos&#x27;, &#x27;&#x27;, $icon);
  add_submenu_page(&#x27;promos&#x27;, &#x27;Promos&#x27;, &#x27;Promos&#x27;, &#x27;read&#x27;, &#x27;promos&#x27;, &#x27;promos_page&#x27;);
  add_submenu_page(&#x27;promos&#x27;, &#x27;Categories&#x27;, &#x27;Categories&#x27;, &#x27;read&#x27;, &#x27;categories&#x27;, &#x27;categories_page&#x27;);
}

function promos_page()
{
  $object = new Pod(&#x27;promotion&#x27;);
  $add_fields = $edit_fields = array(
                    &#x27;name&#x27;,
                    &#x27;slug&#x27;,
                    &#x27;copy&#x27;,
                    &#x27;link&#x27;,
                    &#x27;category&#x27;);
  $object-&gt;ui = array(
                    &#x27;title&#x27;   =&gt; &#x27;Promotion&#x27;,
                    &#x27;columns&#x27; =&gt; array(
                              &#x27;name&#x27;      =&gt; &#x27;Name&#x27;,
                              &#x27;category&#x27;  =&gt; &#x27;Category&#x27;,
                              &#x27;created&#x27;   =&gt; &#x27;Date Created&#x27;,
                              &#x27;modified&#x27;  =&gt; &#x27;Last Modified&#x27;
                              ),
                    &#x27;add_fields&#x27;  =&gt; $add_fields,
                    &#x27;edit_fields&#x27; =&gt; $edit_fields
					);
  pods_ui_manage($object);
}

function categories_page()
{
  $object = new Pod(&#x27;promotion_category&#x27;);
  $add_fields = $edit_fields = array(
                    &#x27;name&#x27;,
                    &#x27;slug&#x27;);
  $object-&gt;ui = array(
                    &#x27;title&#x27;   =&gt; &#x27;Category&#x27;,
                    &#x27;columns&#x27; =&gt; array(
                              &#x27;name&#x27;      =&gt; &#x27;Name&#x27;,
                              &#x27;created&#x27;   =&gt; &#x27;Date Created&#x27;,
                              &#x27;modified&#x27;  =&gt; &#x27;Last Modified&#x27;
                              ),
                    &#x27;add_fields&#x27;  =&gt; $add_fields,
                    &#x27;edit_fields&#x27; =&gt; $edit_fields
					);
  pods_ui_manage($object);
}

add_action(&#x27;admin_menu&#x27;,&#x27;pods_ui_promos&#x27;);

?&gt;</code></pre>
<p>Again, grouping related Pods can help <strong>exponentially</strong> when it comes to showing this new system to actual users. It reduces the learning curve quite a bit, and really helps people hit the ground running.</p>
<p>This is just the beginning when it comes to Pick columns, in future articles I&#8217;ll cover the more advanced attributes of this feature, but understanding these fundamentals will help you get started.</p>
<h4>The Pods CMS Series on <abbr title="Monday By Noon">MBN</abbr></h4>
<p>This article is the <strong>fifth</strong> in a series for Monday By Noon dedicated to <a href="http://pods.uproot.us/">Pods CMS</a>.</p>
<ol>
<li><a href="http://mondaybynoon.com/2010/01/04/introduction-to-pods-cms-wordpress/">An Overview of and Introduction to Pods CMS for WordPress</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pods-basics-installation-and-setup/">Pods Basics: Installation and Setup</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pulling-pods-data/">Pods Basics: Pulling Pods Data to your Theme</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pods-ui-intro/">Pods UI: The Latest and Greatest Addition to Pods</a></li>
<li><a href="http://mondaybynoon.com/2010/01/11/how-to-use-pick-columns-relationships-in-pods/">How to use Pick Columns (Relationships) in Pods</a></li>
<li><a href="http://mondaybynoon.com/2010/01/25/pods-pagination-sorting/">The Last of the Pods Basics: Pagination and Sorting</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://mondaybynoon.com/2010/01/11/how-to-use-pick-columns-relationships-in-pods/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Pods UI: The Latest and Greatest Addition to Pods</title>
		<link>http://mondaybynoon.com/2010/01/04/pods-ui-intro/</link>
		<comments>http://mondaybynoon.com/2010/01/04/pods-ui-intro/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 07:13:33 +0000</pubDate>
		<dc:creator>Jonathan Christopher</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Workbench]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Pods]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://mondaybynoon.com/?p=695</guid>
		<description><![CDATA[Pods UI is a great little plugin the sits on top of Pods and allows you to create WordPress admin navigation entries specifically tailored to the Pods structure you're trying to implement. This article will show you the ground rules when it comes to Pods UI.]]></description>
			<content:encoded><![CDATA[<p>Pods makes it <strong>super easy</strong> to give your clients the upmost control when managing their content. You can custom tailor WordPress not only to power their blog and standard content-heavy Pages, you can give them a Pods installation that helps to manage that one-off group of data that will really help their website completely reflect their business or organization.</p>
<p>If you haven&#8217;t followed the first three articles in the Pods CMS Series, I would recommend starting at the beginning with <a href="http://mondaybynoon.com/2010/01/04/introduction-to-pods-cms-wordpress/">An Overview of and Introduction to Pods CMS for WordPress</a> so you&#8217;re familiar with the setup we&#8217;re working with up to this point.</p>
<h2>Incorporating Pods UI</h2>
<p><a href="http://ui.podscms.org/">Pods UI</a> is the latest feature to become available for Pods. It&#8217;s the first add-on, and I&#8217;m already in love. If you&#8217;ve been keeping up with the Pods CMS Series, we discussed the ability to mark a certain Pod as a Top Level Menu in <a href="http://mondaybynoon.com/2010/01/04/pods-basics-installation-setup/">Pods Basics: Installation and Setup</a>. It was a great way to give a particular Pod a bit more attention by including it as its own entry in the WordPress admin navigation.</p>
<p>If you really take Pods under your wing and end up creating numerous Pods to power various sections of a website, and they all carry a certain bit of importance, the main WordPress admin navigation can get quite busy really quick. Pods UI helps tackle that issue directly.</p>
<p>Before adding Pods UI, we can go ahead and remove Team as a Top Level Menu. Just uncheck the box and click <strong>Save settings</strong>:</p>
<p><img src="http://mondaybynoon.com/images/pods/ui/01-top-level-menu.jpg" alt="Remove Team as a Top Level Menu" /></p>
<p>Now we&#8217;ll go ahead and install the Pods UI plugin, and create our own plugin file that will interact with Pods UI:</p>
<pre class="sh_php"><code>&lt;?php
/*
Plugin Name: Team Pods UI
Plugin URI: http://example.com/
Description: Customized Pods UI
Version: 0.1
Author: Jonathan Christopher
Author URI: http://jchristopher.me/
*/

function pods_ui_team()
{
  $icon = &#x27;&#x27;;
  add_object_page(&#x27;Team&#x27;, &#x27;Team&#x27;, &#x27;read&#x27;, &#x27;team&#x27;, &#x27;&#x27;, $icon);
  add_submenu_page(&#x27;team&#x27;, &#x27;Team&#x27;, &#x27;Team&#x27;, &#x27;read&#x27;, &#x27;team&#x27;, &#x27;team_page&#x27;);
}

function team_page()
{
  $object = new Pod(&#x27;team&#x27;);
  $add_fields = $edit_fields = array(
                    &#x27;name&#x27;,
                    &#x27;position&#x27;,
                    &#x27;photo&#x27;,
                    &#x27;bio&#x27;,
                    &#x27;permalink&#x27;,
                    &#x27;eom&#x27;);
  $object-&gt;ui = array(
                    &#x27;title&#x27;   =&gt; &#x27;Team Member&#x27;,
                    &#x27;columns&#x27; =&gt; array(
                              &#x27;name&#x27;      =&gt; &#x27;Name&#x27;,
                              &#x27;position&#x27;  =&gt; &#x27;Job Title&#x27;,
                              &#x27;created&#x27;   =&gt; &#x27;Date Created&#x27;,
                              &#x27;modified&#x27;  =&gt; &#x27;Last Modified&#x27;
                              ),
                    &#x27;add_fields&#x27;  =&gt; $add_fields,
                    &#x27;edit_fields&#x27; =&gt; $edit_fields
					);
  pods_ui_manage($object);
}

add_action(&#x27;admin_menu&#x27;,&#x27;pods_ui_team&#x27;);

?&gt;</code></pre>
<p><strong>Note:</strong> I&#8217;d suggest creating an additional plugin file <strong>outside</strong> the <code>pods-ui</code> folder you just uploaded when installing Pods UI, else WordPress will think your plugin file is out of date based on the version number.</p>
<p>There is a lot of custom setup going on, all of which is covered in extreme detail in the Pods UI download, but I&#8217;ll cover the basics explaining what we&#8217;ve set up.</p>
<p>At first glance, this is just a simple WordPress plugin, and it is, we&#8217;re simply interacting with the Pods UI plugin as well. The first function that fires here is:</p>
<pre class="sh_php"><code>add_action(&#x27;admin_menu&#x27;,&#x27;pods_ui_team&#x27;);</code></pre>
<p>We&#8217;re hooking <code>admin_menu</code> and firing <code>pods_ui_team</code> as a callback. <code>pods_ui_team</code> is defined as follows:</p>
<pre class="sh_php"><code>function pods_ui_team()
{
  $icon = &#x27;&#x27;;
  add_object_page(&#x27;Team&#x27;, &#x27;Team&#x27;, &#x27;read&#x27;, &#x27;team&#x27;, &#x27;&#x27;, $icon);
  add_submenu_page(&#x27;team&#x27;, &#x27;Team&#x27;, &#x27;Team&#x27;, &#x27;read&#x27;, &#x27;team&#x27;, &#x27;team_page&#x27;);
}</code></pre>
<p>Pods UI allows you to define an icon file to use in the sidebar, a nice bit of customization available! From there, we fire <code>add_object_page</code>, a Pods UI function that sets up the menu structure and includes the icon we just defined. This creates a &#8216;section&#8217; in the WordPress admin navigation sidebar. <code>add_submenu_page</code> then adds a submenu entry to the sidebar section we just created. The last parameter we pass when firing <code>add_submenu_page</code> defines the callback we&#8217;d like to fire when that menu is clicked. That&#8217;s the other function we need to define in our plugin file:</p>
<pre class="sh_php"><code>function team_page()
{
  $object = new Pod(&#x27;team&#x27;);
  $add_fields = $edit_fields = array(
                    &#x27;name&#x27;,
                    &#x27;position&#x27;,
                    &#x27;photo&#x27;,
                    &#x27;bio&#x27;,
                    &#x27;permalink&#x27;,
                    &#x27;eom&#x27;);
  $object-&gt;ui = array(
                    &#x27;title&#x27;   =&gt; &#x27;Team Member&#x27;,
                    &#x27;columns&#x27; =&gt; array(
                              &#x27;name&#x27;      =&gt; &#x27;Name&#x27;,
                              &#x27;position&#x27;  =&gt; &#x27;Job Title&#x27;,
                              &#x27;created&#x27;   =&gt; &#x27;Date Created&#x27;,
                              &#x27;modified&#x27;  =&gt; &#x27;Last Modified&#x27;
                              ),
                    &#x27;add_fields&#x27;  =&gt; $add_fields,
                    &#x27;edit_fields&#x27; =&gt; $edit_fields
					);
  pods_ui_manage($object);
}</code></pre>
<p>In this function, we define a series of variables. We first define our <code>$object</code> as the Pod with which we&#8217;d like to link this UI element. We then define <code>$add_fields</code> as an array of columns we&#8217;d like to include on the &#8216;add&#8217; screen. We can include or omit any existing columns we&#8217;d like. In this case, we&#8217;ve added all available columns. Next, we define <code>object-&gt;ui</code> which actually builds the &#8216;browse&#8217; table view listing out any existing Pods data. We can define which columns are visible (and therefore sortable) which is <em>very</em> useful! Finally, we fire <code>pods_ui_manage($object);</code> which makes all the magic happen, and we have even more useful sidebar entries for our Pods.</p>
<p><img src="http://mondaybynoon.com/images/pods/ui/02-table-view.jpg" alt="Pods UI in action with our Team Pod" /></p>
<p>While not completely obvious with just a Team Pod, the real beauty of Pods UI comes when you group a selection of Pods under a generic heading. These cases are usually very client-specific, but can really make the usability of Pods that much better.</p>
<p>This article is meant to be the <strong>most basic</strong> introduction to <a href="http://ui.podscms.org/">Pods UI</a>, I would absolutely suggest checking out the <a href="http://ui.podscms.org/codex/">User Guide</a> for further information.</p>
<h4>The Pods CMS Series on <abbr title="Monday By Noon">MBN</abbr></h4>
<p>This article is the <strong>fourth</strong> in a series for Monday By Noon dedicated to <a href="http://pods.uproot.us/">Pods CMS</a>.</p>
<ol>
<li><a href="http://mondaybynoon.com/2010/01/04/introduction-to-pods-cms-wordpress/">An Overview of and Introduction to Pods CMS for WordPress</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pods-basics-installation-and-setup/">Pods Basics: Installation and Setup</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pulling-pods-data/">Pods Basics: Pulling Pods Data to your Theme</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pods-ui-intro/">Pods UI: The Latest and Greatest Addition to Pods</a></li>
<li><a href="http://mondaybynoon.com/2010/01/11/how-to-use-pick-columns-relationships-in-pods/">How to use Pick Columns (Relationships) in Pods</a></li>
<li><a href="http://mondaybynoon.com/2010/01/25/pods-pagination-sorting/">The Last of the Pods Basics: Pagination and Sorting</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://mondaybynoon.com/2010/01/04/pods-ui-intro/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Pods Basics: Pulling Pods Data to your Theme</title>
		<link>http://mondaybynoon.com/2010/01/04/pulling-pods-data/</link>
		<comments>http://mondaybynoon.com/2010/01/04/pulling-pods-data/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 07:13:27 +0000</pubDate>
		<dc:creator>Jonathan Christopher</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Workbench]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Pods]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://mondaybynoon.com/?p=685</guid>
		<description><![CDATA[Perhaps the most important part of a WordPress plugin is being able to work with it in a way that effectively fits within your workflow. Pods has done a great job with letting you manage every aspect of your content. In this article I'll walk you through pulling data stored in Pods to your custom WordPress template.]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t had a chance to read the first two articles in the series, I would definitely suggest taking a few minutes to read both <a href="http://mondaybynoon.com/2010/01/04/introduction-to-pods-cms-wordpress/">An Overview of and Introduction to Pods CMS for WordPress</a> as well as <a href="http://mondaybynoon.com/2010/01/04/pods-basics-installation-setup/">Pods Basics: Installation and Setup</a>. There are details discussed in each article explaining how we&#8217;ve worked our way to this stage, pulling data from Pods into our theme.</p>
<h2>Pods Pages</h2>
<p>Pods comes standard with a feature called Pods Pages baked right in. There is a ton of documentation available in the <a href="http://pods.uproot.us/codex/pod_pages">User Guide</a>, and an entire section set up in the Pods admin screens:</p>
<p><img src="http://mondaybynoon.com/images/pods/pull/01-pages.jpg" alt="Pods Pages in the Pods admin" /></p>
<p>While I&#8217;m really impressed with the Pods Pages implementation, I actually prefer not to use it. Instead, I like to integrate Pods itself into my theme files. I like to work with my hands a bit dirty when it comes to plugins, and would rather work with PHP itself in my favorite text editor the way I normally would when developing a WordPress theme. Thankfully, Pods has done a fantastic job with supporting developers like me. For the time being, we&#8217;re going to skip the Pages section of the Pods admin, and crack open our template files themselves.</p>
<h3>Setting up our Team page</h3>
<p>For the purposes of this example, I&#8217;m going to work with the default WordPress theme that ships with every download. I&#8217;m going to create a really generic template that we can work with:</p>
<pre class="sh_php sh_html"><code>&lt;?php

/* Template Name: Team */

get_header(); ?&gt;

  &lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot; role=&quot;main&quot;&gt;

    &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
    &lt;div class=&quot;post&quot; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;
    &lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
      &lt;div class=&quot;entry&quot;&gt;

        &lt;?php the_content(); ?&gt;

        &lt;h2&gt;Our Team&lt;/h2&gt;

        &lt;?php
          $team = new Pod(&#x27;team&#x27;);
          $team-&gt;findRecords(&#x27;name ASC&#x27;);
          $total_members = $team-&gt;getTotalRows();
        ?&gt;

        &lt;?php if( $total_members&gt;0 ) : ?&gt;
          &lt;?php while ( $team-&gt;fetchRecord() ) : ?&gt;

            &lt;?php
              // set our variables
              $member_id        = $team-&gt;get_field(&#x27;id&#x27;);
              $member_name      = $team-&gt;get_field(&#x27;name&#x27;);
              $member_position  = $team-&gt;get_field(&#x27;position&#x27;);
              $member_photo     = $team-&gt;get_field(&#x27;photo&#x27;);
              $member_bio       = $team-&gt;get_field(&#x27;bio&#x27;);
              $member_eom       = $team-&gt;get_field(&#x27;eom&#x27;);

              // data cleanup
              $member_bio       = wpautop( $member_bio );
              $member_photo     = $member_photo[0][&#x27;guid&#x27;];
            ?&gt;

            &lt;div class=&quot;member&quot; id=&quot;member&lt;?php echo $member_id; ?&gt;&quot;&gt;
              &lt;h3&gt;&lt;?php echo $member_name; ?&gt;&lt;/h3&gt;
              &lt;h4&gt;&lt;?php echo $member_position; ?&gt;&lt;/h4&gt;
              &lt;?php if( !empty( $member_photo ) ) : ?&gt;
                &lt;img src=&quot;&lt;?php echo $member_photo; ?&gt;&quot; alt=&quot;Photo of &lt;?php echo $member_name; ?&gt;&quot; /&gt;
              &lt;?php endif ?&gt;
              &lt;?php echo $member_bio; ?&gt;
            &lt;/div&gt;
            &lt;!-- /member --&gt;

          &lt;?php endwhile ?&gt;
        &lt;?php endif ?&gt;

      &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php endwhile; endif; ?&gt;

  &lt;/div&gt;

&lt;?php get_sidebar(); ?&gt;

&lt;?php get_footer(); ?&gt;</code></pre>
<p>At first glance, it may look like there is <strong>a ton going on here</strong> but once we break it down, you won&#8217;t be very intimidated, I promise!</p>
<p>From a really high level, we&#8217;re working with a very basic WordPress template file here. The interesting bits begin with:</p>
<pre class="sh_php"><code>$team = new Pod('team');</code></pre>
<p>This is <em>huge</em>! What we&#8217;re doing here is defining <code>$team</code> as a Pods object, ready to interact with the data we&#8217;ve entered. When we fire:</p>
<pre class="sh_php"><code>$team-&gt;findRecords(&#x27;name ASC&#x27;);</code></pre>
<p>We&#8217;re calling a Pods function that lets us directly work with the existing data. If you check out the <a href="http://pods.uproot.us/codex/findrecords">User Guide for findRecords</a> you&#8217;ll discover the various parameters available to us. We can control the order in which the data is returned, the number of records per page, limit the returned data based on certain criteria, and even <strong>use our own SQL</strong> to pull the data. In this example, the only parameter we&#8217;re passing orders the returned data by our <code>name</code> column. A ton of power lies in <code>findRecords</code>, and subsequent articles will cover much of what you can do when pulling your Pods data.</p>
<p>When we fire:</p>
<pre class="sh_php"><code>$total_members = $team-&gt;getTotalRows();</code></pre>
<p>We&#8217;re giving ourselves a reference to check against that tells us just how many records are in the current Pod. This allows us to run a conditional to check whether we even need to continue any further:</p>
<pre class="sh_php"><code>if( $total_members>0 )
{
	// work with our data
}</code></pre>
<p>Once we&#8217;ve established that we do indeed have data with which to work, we get to the other really exciting part of Pods:</p>
<pre class="sh_php"><code>&lt;?php while ( $team-&gt;fetchRecord() ) : ?&gt;

  &lt;?php
    // set our variables
    $member_id        = $team-&gt;get_field(&#x27;id&#x27;);
    $member_name      = $team-&gt;get_field(&#x27;name&#x27;);
    $member_position  = $team-&gt;get_field(&#x27;position&#x27;);
    $member_photo     = $team-&gt;get_field(&#x27;photo&#x27;);
    $member_bio       = $team-&gt;get_field(&#x27;bio&#x27;);
    $member_eom       = $team-&gt;get_field(&#x27;eom&#x27;);

    // data cleanup
    $member_bio       = wpautop( $member_bio );
    $member_photo     = $member_photo[0][&#x27;guid&#x27;];
  ?&gt;

&lt;?php endwhile ?&gt;</code></pre>
<p>We&#8217;re running a couple of Pods-specific functions here that you&#8217;ll want to become familiar with:</p>
<dl>
<dt><a href="http://pods.uproot.us/codex/fetchrecord"><code>fetchRecord</code></a></dt>
<dd>Retrieves the next record from our <code>$team</code> object</dd>
<dt><a href="http://pods.uproot.us/codex/get_field"><code>get_field</code></a></dt>
<dd>Retrieves the data for a specific column (referenced by its given <code>name</code> when the Pod was created)</dd>
</dl>
<p>So what we&#8217;re doing with this <code>while</code> is looping through all available records in our Team Pod. We&#8217;ve only hit this loop because of the preceding conditional that checked to make sure there was at least one record in the first place. Each field is assigned to a variable for future reference. We&#8217;re also able to format the data should the need arise. For example, when it comes to paragraph columns, I like to fire <code>wpautop</code> to ensure the markup is cleaned up a bit prior to my use.</p>
<p><strong>Note:</strong> File upload columns return an array no matter what when <code>get_field</code> is fired. The array consists of a number of fields, <code>guid</code> being the actual location of the file, and more than likely the most common field you&#8217;ll be using.</p>
<p>As it stands, we&#8217;ve defined all the variables we&#8217;d like to work with, so it&#8217;s a matter of dumping them out as you would any other time:</p>
<pre class="sh_php"><code>&lt;div class=&quot;member&quot; id=&quot;member&lt;?php echo $member_id; ?&gt;&quot;&gt;
  &lt;h3&gt;&lt;?php echo $member_name; ?&gt;&lt;/h3&gt;
  &lt;h4&gt;&lt;?php echo $member_position; ?&gt;&lt;/h4&gt;
  &lt;?php if( !empty( $member_photo ) ) : ?&gt;
    &lt;img src=&quot;&lt;?php echo $member_photo; ?&gt;&quot; alt=&quot;Photo of &lt;?php echo $member_name; ?&gt;&quot; /&gt;
  &lt;?php endif ?&gt;
  &lt;?php echo $member_bio; ?&gt;
&lt;/div&gt;
&lt;!-- /member --&gt;</code></pre>
<h2>Giving each Team member a dedicated page</h2>
<p>While it&#8217;s great that we can pull all this data in any way we&#8217;d like, Pods lets us take things even further by taking advantage of the <code>slug</code> column we set up and implemented. First, you&#8217;ll need to confirm that you&#8217;ve properly set up your <code>.htaccess</code> file, and permalinks are working properly. This is <strong>essential</strong>. The next thing we&#8217;ll need to do is make a quick change to our (now) Team index page:</p>
<pre class="sh_php"><code>&lt;?php

/* Template Name: Team */

get_header(); ?&gt;

  &lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot; role=&quot;main&quot;&gt;

    &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
    &lt;div class=&quot;post&quot; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;
    &lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
      &lt;div class=&quot;entry&quot;&gt;

        &lt;?php the_content(); ?&gt;

        &lt;h2&gt;Our Team&lt;/h2&gt;

        &lt;?php
          $team = new Pod(&#x27;team&#x27;);
          $team-&gt;findRecords(&#x27;name ASC&#x27;);
          $total_members = $team-&gt;getTotalRows();
        ?&gt;

        &lt;?php if( $total_members&gt;0 ) : ?&gt;
          &lt;ul&gt;
            &lt;?php while ( $team-&gt;fetchRecord() ) : ?&gt;

              &lt;?php
                // set our variables
                $member_id        = $team-&gt;get_field(&#x27;id&#x27;);
                $member_name      = $team-&gt;get_field(&#x27;name&#x27;);
                $member_position  = $team-&gt;get_field(&#x27;position&#x27;);
                $member_slug      = $team-&gt;get_field(&#x27;permalink&#x27;);
              ?&gt;

              &lt;li&gt;
                &lt;a href=&quot;&lt;?php echo get_permalink(); ?&gt;&lt;?php echo $member_slug; ?&gt;/&quot;&gt;
                  &lt;?php echo $member_name; ?&gt; - &lt;?php echo $member_position; ?&gt;
                &lt;/a&gt;
              &lt;/li&gt;

            &lt;?php endwhile ?&gt;
          &lt;/ul&gt;
        &lt;?php endif ?&gt;

      &lt;/div&gt;
    &lt;/div&gt;
    &lt;?php endwhile; endif; ?&gt;

  &lt;/div&gt;

&lt;?php get_sidebar(); ?&gt;

&lt;?php get_footer(); ?&gt;</code></pre>
<p>Instead of looping through our data and dumping out everything on a single page, we&#8217;ll now have an unordered list including list items containing the team member name and position, linking to his unique URL by using the automatically generated slug Pods has provided. If you save this revised template, you&#8217;ll see that the team members are listed properly, but clicking his link results in a 404 page not found. That&#8217;s because we haven&#8217;t told Pods to take over when it comes to these links. This is where we&#8217;ll return to Pods Pages.</p>
<p>Click Pods in the left hand WordPress admin navigation, and select Pages from the top of the resulting page, we&#8217;re going to <strong>Add new page</strong>:</p>
<p><img src="http://mondaybynoon.com/images/pods/pull/02-add-pod-page.jpg" alt="Adding a new Pods Page" /></p>
<p>Giving your Pods Page the proper name is <em>essential</em>, so mind your spelling, and make sure your page name is acceptable. Of particular note here is the <code>/*</code> portion of our Page name. Since <code>team/</code> has already been claimed, we&#8217;re going to let WordPress have it. We only want to use this Pods Page when we&#8217;re trying to view a particular Team member page, hence the <strong>wildcard</strong>. When naming Pages with a wildcard, Pods will recognize that it should look for anything with <code>team/</code> in the URL, followed by another URL segment.</p>
<p>Once you&#8217;ve created the <code>team/*</code> page, we&#8217;ll need to create a new WordPress template.</p>
<h4>Alternative Pods Pages setup</h4>
<p>In this case, I opted to set up the Team index page as a WordPress page. Alternatively, we could have set up a new Pods Page named <code>team</code>, defined our template file, and continued without problem. I sometimes prefer to add the &#8216;index&#8217; type pages as WordPress pages depending on the client, as well as the other pages of the site. I&#8217;ll usually create an index page as a WordPress page so I can still make use of the user defined title and content, and dump out the Pods data after that. Sometimes, however, you won&#8217;t want the client adding their own content to the page. If that&#8217;s the case, it would make sense to create the index page as a Pods Page instead of a WordPress Page.</p>
<h3>Setting up our Team member template</h3>
<p>We&#8217;ve got our Team index template, but we haven&#8217;t yet told Pods which template to use for our <code>team/*</code> page. Let&#8217;s create it:</p>
<pre class="sh_php"><code>&lt;?php

/* Template Name: Team - Member */

get_header(); ?&gt;

  &lt;?php

    $found_member = false;

    global $pods;
    $member_slug  = pods_url_variable(-1);
    $member       = new Pod(&#x27;team&#x27;, $member_slug);

    if( !empty( $member-&gt;data ) )
    {
      $found_member = true;

      // set our variables
      $member_id         = $member-&gt;get_field(&#x27;id&#x27;);
      $member_name       = $member-&gt;get_field(&#x27;name&#x27;);
      $member_position   = $member-&gt;get_field(&#x27;position&#x27;);
      $member_photo      = $member-&gt;get_field(&#x27;photo&#x27;);
      $member_bio        = $member-&gt;get_field(&#x27;bio&#x27;);
      $member_eom        = $member-&gt;get_field(&#x27;eom&#x27;);

      // data cleanup
      $member_bio        = wpautop( $member_bio );
      $member_photo      = $member_photo[0][&#x27;guid&#x27;];
    }
  ?&gt;

  &lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot; role=&quot;main&quot;&gt;

    &lt;?php if( $found_member ) : ?&gt;

      &lt;div class=&quot;post&quot; id=&quot;post-&lt;?php echo $member_id; ?&gt;&quot;&gt;
        &lt;h2&gt;&lt;?php echo $member_name; ?&gt;&lt;/h2&gt;
        &lt;div class=&quot;entry&quot;&gt;
          &lt;h4&gt;&lt;?php echo $member_position; ?&gt;&lt;/h4&gt;
          &lt;?php if( !empty( $member_photo ) ) : ?&gt;
            &lt;img src=&quot;&lt;?php echo $member_photo; ?&gt;&quot; alt=&quot;Photo of &lt;?php echo $member_name; ?&gt;&quot; /&gt;
          &lt;?php endif ?&gt;
          &lt;?php echo $member_bio; ?&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;?php else: ?&gt;

      &lt;div class=&quot;post&quot;&gt;
	    &lt;h2&gt;Team Member Not Found&lt;/h2&gt;
	    &lt;div class=&quot;entry&quot;&gt;
	      &lt;p&gt;Sorry, that Team member could not be found!&lt;/p&gt;
	    &lt;/div&gt;
	  &lt;/div&gt;

    &lt;?php endif ?&gt;

  &lt;/div&gt;

&lt;?php get_sidebar(); ?&gt;

&lt;?php get_footer(); ?&gt;</code></pre>
<p>Save this as a <strong>new</strong> template file. As a result of the AJAX nature of Pods, we&#8217;ll need to &#8216;cycle&#8217; the Pods Pages page by hitting Pods in the sidebar, choosing Pages from the tabs up top, and choosing our newly created <code>team/*</code> from the dropdown. Our Page will load, and the field we&#8217;ll need to pay particular attention to is the <code>-- Page Template --</code> dropdown in the lower right. Select our newly created <code>Team - Member</code> entry and click <strong>Save changes</strong>:</p>
<p><img src="http://mondaybynoon.com/images/pods/pull/03-pod-page-template.jpg" alt="Adding a new Pods Page" /></p>
<p>You can now head back to our team index, hit a link in our Team list, and check out the new one-off page for each Team member!</p>
<p>A few new things are happening in this template. We&#8217;ll focus on the following snippet:</p>
<pre class="sh_php"><code>global $pods;
$member_slug  = pods_url_variable(-1);
$member       = new Pod('team', $member_slug);</code></pre>
<p>First, we need to bring in the <code>global $pods;</code> variable; we&#8217;ll need it. Pods has a nice function available called <a href="http://pods.uproot.us/codex/pods_url_variable"><code>pods_url_variable()</code></a> that lets us pull URL segments and use them as variables. We know that the last segment on this page is going to be our Team member <code>slug</code>, so we&#8217;ll go ahead and set that.</p>
<p>When we fire:</p>
<pre class="sh_php"><code>global $pods;
$member_slug  = pods_url_variable(-1);
$member       = new Pod('team', $member_slug);</code></pre>
<p>We&#8217;re passing that slug as a parameter when initially defining our Pods object. Under the hood, Pods is pulling a record from the database that has a permalink that matches the string we&#8217;re passing. Wicked handy. Since we&#8217;re basing our data on the passed slug, we&#8217;re going to need to consider the possibility of an invalid URL, we can use a quick conditional:</p>
<pre class="sh_php"><code>if( !empty( $member->data ) )
{
  // dump our data
}</code></pre>
<p>There are a number of ways you can check to see if a record is returned, just make sure you have a fallback in place. Once we know that we have data to work with, we can fire <code>get_field()</code> and pull whatever we need. Easy peasy.</p>
<h4>The Pods CMS Series on <abbr title="Monday By Noon">MBN</abbr></h4>
<p>This article is the <strong>third</strong> in a series for Monday By Noon dedicated to <a href="http://pods.uproot.us/">Pods CMS</a>.</p>
<ol>
<li><a href="http://mondaybynoon.com/2010/01/04/introduction-to-pods-cms-wordpress/">An Overview of and Introduction to Pods CMS for WordPress</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pods-basics-installation-and-setup/">Pods Basics: Installation and Setup</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pulling-pods-data/">Pods Basics: Pulling Pods Data to your Theme</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pods-ui-intro/">Pods UI: The Latest and Greatest Addition to Pods</a></li>
<li><a href="http://mondaybynoon.com/2010/01/11/how-to-use-pick-columns-relationships-in-pods/">How to use Pick Columns (Relationships) in Pods</a></li>
<li><a href="http://mondaybynoon.com/2010/01/25/pods-pagination-sorting/">The Last of the Pods Basics: Pagination and Sorting</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://mondaybynoon.com/2010/01/04/pulling-pods-data/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>Pods Basics: Installation and Setup</title>
		<link>http://mondaybynoon.com/2010/01/04/pods-basics-installation-and-setup/</link>
		<comments>http://mondaybynoon.com/2010/01/04/pods-basics-installation-and-setup/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 07:13:20 +0000</pubDate>
		<dc:creator>Jonathan Christopher</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Workbench]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Pods]]></category>
		<category><![CDATA[setup]]></category>

		<guid isPermaLink="false">http://mondaybynoon.com/?p=677</guid>
		<description><![CDATA[Pods CMS for WordPress is quite easy to work with once you overcome the initial learning curve. In this article I'll walk you through the installation and setup of your first Pod.]]></description>
			<content:encoded><![CDATA[<p>Installing <a href="http://pods.uproot.us/">Pods</a> is equally easy as installing any other WordPress plugin. You can either use the built in admin installer, or upload the plugin files to your <code>plugins</code> directory. Once installed, go ahead and activate Pods. You may receive a not-so-pretty notice letting you know that you need to modify your <code>.htaccess</code> file. This is so Pods Pages can work properly using SEO friendly slugs (just like WordPress does). Pods offers a text file from which you can copy an acceptable <code>.htaccess</code> file, and even tells you where the file needs to be on your server.</p>
<p>Once installed, Pods gives itself an entry in the admin sidebar:</p>
<p><img src="http://mondaybynoon.com/images/pods/basics/01-pods-home.jpg" alt="Pods in the WordPress Admin" /></p>
<p>Under the Pods entry in the sidebar are a number of additional links.</p>
<dl>
<dt>Browse Content</dt>
<dd>Allows you to browse all the content in the Pods database tables.</dd>
<dt>Package Manager</dt>
<dd>Pods has a built in import/export system which allows your existing Pods to be portable.</dd>
<dt>Menu Editor</dt>
<dd>Pods also allows you to build a navigation structure based on your existing Pods much like WordPress Pages.</dd>
<dt>Add country, Add state</dt>
<dd>These are existing Pods included by default. You can manage the Pod content using these links.</dd>
</dl>
<h2>How to create a Pod</h2>
<p>I define the need for a Pod when a website has a particular section of pages (or even a single page) that requires a specific set of fields having to do with the subject at hand. As an example, we&#8217;ll go ahead and create a Team Pod that will house the various details about company team members. The First step is to Add the Pod by clicking Pods up top, and then Add new Pod:</p>
<p><img src="http://mondaybynoon.com/images/pods/basics/02-add-pod.jpg" alt="Adding a Pod" /></p>
<p><strong>Note:</strong> When creating a Pod, the name <em>must</em> be lowercase, no special characters or spaces.</p>
<p>After you&#8217;ve created your Pod, your instantly brought to the Pod manager. Here is where you&#8217;ll define what fields your Pod has, as well as a few settings regarding the Pod itself:</p>
<p><img src="http://mondaybynoon.com/images/pods/basics/03-pod-manager.jpg" alt="The Pod Manager" /></p>
<p>By default, Pods will add a name field (which is permanently required) as well as a <code>desc</code> (description) field. The available fields in Pods are as follows:</p>
<dl>
<dt>Date</dt>
<dd>Required to be a date</dd>
<dt>Number</dt>
<dd>Validated as a number</dd>
<dt>Boolean</dt>
<dd>Renders as a checkbox to the user</dd>
<dt>Single Line Text</dt>
<dd>Generic single line text box</dd>
<dt>Paragraph Text</dt>
<dd>Multiline text box with HTML formatting</dd>
<dt>Code</dt>
<dd>Multiline code field</dd>
<dt>File Upload</dt>
<dd>Ties in directly with the WordPress Media library, also allows you to upload new media directly</dd>
<dt>Permalink (slug)</dt>
<dd>Automatic slug generation for each Pod entry</dd>
<dt>Relationship (pick)</dt>
<dd>Allows the Pod entry to be linked to another Pod or a WordPress object (Page, Post, User)</dd>
</dl>
<p>With this being a basics-only tutorial, the last bit which will be useful when first working with Pods is the Attributes section of the field. Using the available check boxes, you can make a field required (can&#8217;t be empty) or unique (can&#8217;t duplicate the data entered in another entry).</p>
<h3>Adding fields to your Pod</h3>
<p>You can add as many columns (fields) to your Pod as you&#8217;d like. For our example purpose, we&#8217;ll add the following columns (name already present by default):</p>
<ul>
<li><strong>Job Title</strong>: single line text</li>
<li><strong>Photo</strong>: file upload</li>
<li><strong>Bio</strong>: paragraph text</li>
<li><strong>Employee of the Month</strong>: boolean</li>
<li><strong>Permalink (optional)</strong>: permalink (slug)</li>
</ul>
<p>When adding columns, do yourself a favor and make the name both easy to type as well as easy to remember. No spaces, all lowercase, no special characters. Pods provides a Label field for us to better describe the column to our user:</p>
<p><strong>Note:</strong> You&#8217;ll notice that we&#8217;re using a Permalink column in this Pod. Permalinks work in the same way as in WordPress itself. I&#8217;ve purposely labeled this column as <em>optional</em> primarily because the word itself confuses clients. Additionally, Pods will automatically generate a slug when the Pod is submitted if nothing is filled out. No harm, no foul.</p>
<p><img src="http://mondaybynoon.com/images/pods/basics/04-pod-column-label.jpg" alt="The Pod Column Label" /></p>
<p>When all of our columns are added, we can reorder our fields by dragging the arrow icon and clicking Save settings, we can edit a single column by clicking the pencil icon, and we can remove a field by clicking the appropriate red X. We&#8217;ll go ahead and remove the <code>body</code> field if you haven&#8217;t already, and be left with the fields we&#8217;d like to work with:</p>
<p><img src="http://mondaybynoon.com/images/pods/basics/05-team-fields.jpg" alt="All of our fields in the Pod" /></p>
<p><strong>Note:</strong> Pods uses AJAX <em>a lot</em>. When reordering columns, you&#8217;ll need to hit Save settings in order for that change to be applied. Additionally, when creating new Pods, entries in the sidebar will not appear until you&#8217;ve refreshed the page. It&#8217;s sometimes a recurring theme, but the AJAX is helpful as it allows you to rapidly build your Pod without having to wait for page refreshes every time. I imagine this will be improved upon where possible in further releases.</p>
<h2>Managing the content stored in your Pods</h2>
<p>Setting up your Pod is only one-third of the process. After getting your columns in order, you need to populate some data to work with. This also gives you great insight regarding what your client will see when they manage their data. If you hit the Pods link in the sidebar to force a page refresh, you&#8217;ll notice a new entry at the bottom:</p>
<p><img src="http://mondaybynoon.com/images/pods/basics/06-team-entry.jpg" alt="Our new Team entry in the sidebar" /></p>
<p>Clicking this new entry will allow us to manage the content within our new Pod.</p>
<p><img src="http://mondaybynoon.com/images/pods/basics/07-add-team-member.jpg" alt="The Edit Pod screen" /></p>
<p>Clicking Save changes will save all the data to our Pod for reference in our theme. If you hit the Browse button at the top of the edit screen, you&#8217;re shown a listing of all <code>team</code> entries:</p>
<p><img src="http://mondaybynoon.com/images/pods/basics/08-browse-team-members.jpg" alt="Browsing Pods entries" /></p>
<p>Isn&#8217;t that much better than creating a generic WordPress page? You can order your Pods entries by the available columns, and limit the listing by narrowing the search as you can when browsing other WordPress data tables in the admin.</p>
<h3>Integrating your Pods a bit more</h3>
<p>Pods allows you to make managing this content that much more straightforward. If you edit the <code>team</code> Pod we just created by clicking Pods (in the sidebar), then the Pods tab up top, and choose team from the dropdown, our <code>team</code> fields will be loaded and we can maintain the various attributes of this Pod. What we&#8217;re going to do is mark this Pod as a Top Level Menu. What that means is that our Pod will now show up as its own entry in the WordPress admin sidebar, as opposed to being a subentry under the Pods heading. To make this change, simply check off that this pod is indeed a Top Level Menu, and give it a Menu Label:</p>
<p><img src="http://mondaybynoon.com/images/pods/basics/09-top-level-menu.jpg" alt="Make our Pod a Top Level Menu" /></p>
<p>Once you&#8217;ve filled out the label, you can go ahead and click <strong>Save settings</strong>. We&#8217;ll again hit the Pods entry in the sidebar on the left, and you&#8217;ll notice that we now have a dedicated entry for our Teams Pod. Awesome!</p>
<p><img src="http://mondaybynoon.com/images/pods/basics/10-top-level-menu.jpg" alt="Our Teams Pod as a top level menu" /></p>
<p>Implementing your Pod on this level will help your user to better make sense of how to manage the content of this custom data set.</p>
<h2>Limiting access to Pods</h2>
<p>One of my favorite features about Pods is that it gives you fine grained control when determining who will be able to manage what when it comes to your Pods content. Using the Roles panel, you can give user accounts access to certain Pods and remove access from others. The feature comes in really handy when taking advantage of the various user <a href="http://codex.wordpress.org/Roles_and_Capabilities">Roles</a> WordPress provides. You can manage this access by clicking Pods on the left in the sidebar, and then hitting the Roles tab up top:</p>
<p><img src="http://mondaybynoon.com/images/pods/basics/11-roles.jpg" alt="The Roles feature in Pods" /></p>
<p>Now that we&#8217;ve set up our Pod and added a bit of data to it, the next article in this Pods CMS Series will guide you through pulling the data for use in your theme.</p>
<h4>The Pods CMS Series on <abbr title="Monday By Noon">MBN</abbr></h4>
<p>This article is the <strong>second</strong> in a series for Monday By Noon dedicated to <a href="http://pods.uproot.us/">Pods CMS</a>.</p>
<ol>
<li><a href="http://mondaybynoon.com/2010/01/04/introduction-to-pods-cms-wordpress/">An Overview of and Introduction to Pods CMS for WordPress</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pods-basics-installation-and-setup/">Pods Basics: Installation and Setup</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pulling-pods-data/">Pods Basics: Pulling Pods Data to your Theme</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pods-ui-intro/">Pods UI: The Latest and Greatest Addition to Pods</a></li>
<li><a href="http://mondaybynoon.com/2010/01/11/how-to-use-pick-columns-relationships-in-pods/">How to use Pick Columns (Relationships) in Pods</a></li>
<li><a href="http://mondaybynoon.com/2010/01/25/pods-pagination-sorting/">The Last of the Pods Basics: Pagination and Sorting</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://mondaybynoon.com/2010/01/04/pods-basics-installation-and-setup/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>An Overview of and Introduction to Pods CMS for WordPress</title>
		<link>http://mondaybynoon.com/2010/01/04/introduction-to-pods-cms-wordpress/</link>
		<comments>http://mondaybynoon.com/2010/01/04/introduction-to-pods-cms-wordpress/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 07:13:13 +0000</pubDate>
		<dc:creator>Jonathan Christopher</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Favorites]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Workbench]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Pods]]></category>

		<guid isPermaLink="false">http://mondaybynoon.com/?p=672</guid>
		<description><![CDATA[Pods is a fantastic plugin for WordPress that helps you bring content management to the next level on your favorite platform. If you follow me on Twitter, you know that I talk about Pods a lot. It's time that I showed you what I've learned so far in hopes that it helps you get up and running with Pods as well.]]></description>
			<content:encoded><![CDATA[<p>If you <a href="http://twitter.com/jchristopher">follow me on Twitter</a> you know that I mention <a href="http://pods.uproot.us/">Pods</a> <strong>a lot</strong>. As defined by its creators:</p>
<blockquote cite="http://pods.uproot.us/">
<p>Pods is a CMS framework for WordPress. It&#8217;s a plugin that sits on top of WordPress, allowing you to add and display your own content types.</p>
</blockquote>
<p>Calling Pods a &#8216;plugin&#8217; <strong>is an understatement</strong>. It&#8217;s one of those WordPress plugins that does so much more than provide some functionality to work with that makes your life a bit easier or makes WordPress that much more useful. <em>Pods has changed the way I work with WordPress</em>. Pods has allowed me to truly use WordPress as the content management system it was born to be. While a ton of great stuff is happening in the core, Pods is giving us what we need to work with today, and it&#8217;s spectacular.</p>
<p>Over the next few months, I plan to divulge all I know about Pods in a series of tutorials and articles meant to act as my own personal user guide for Pods. Pods is a big enough system where you can actually work with it in your own style, and I think I&#8217;ve done that to an extent. Pods has an entire level of author features that I don&#8217;t particularly make use of simply because I prefer to get my hands even dirtier than Pods requires.</p>
<h2>An introduction to Pods</h2>
<p class="article-image"><a href="http://pods.uproot.us"><img src="http://mondaybynoon.com/images/pods-logo.png" alt="Pods Logo" /></a></p>
<p>As it is defined, <a href="http://pods.uproot.us">Pods</a> is a content management plugin for <a href="http://wordpress.org">WordPress</a>. Many people may wonder why a plugin is needed to make WordPress a content management system, doesn&#8217;t it do that already? <strong>Absolutely</strong>, but out of the box, WordPress specifically caters to a few types of content; <a href="http://codex.wordpress.org/Writing_Posts">Posts</a>, <a href="http://codex.wordpress.org/Pages">Pages</a>, <a href="http://codex.wordpress.org/Working_with_WordPress#WordPress_Media">Media</a>, <a href="http://codex.wordpress.org/Working_with_WordPress#Fighting_Comment_Spam">Comments</a>, and <a href="http://codex.wordpress.org/Links_Manager">Links</a>. WordPress does <strong>a ton</strong> more (such as categories, tags, users, etc.), but as far as the average user is concerned, those are the major content types you&#8217;re able to work with. Themes bring all that managed content together to share with the world, and plugins build on top of that even more.</p>
<p>Many plugins exist to provide you with a new type of content to manage, most often a specific type of content aimed at achieving a specific goal. That&#8217;s awesome, and helps tons of people to make that change they&#8217;re looking to update on their site. Pods, however, thinks about things in a different way.</p>
<p><a href="http://pods.uproot.us/">Pods</a> provides a platform on which to <em>build your own content types</em> to manage, all the while providing some really advanced functionality having to do with that content. From the <cite><a href="http://pods.uproot.us/codex/how_pods_works">User Guide</a></cite>, a Pod is a group of input fields. You can add and arrange any number of the various available input fields to any number of Pods, essentially creating your own custom CMS for each website you build in WordPress.</p>
<h3>Finding the happy medium between WordPress core and Pods</h3>
<p>So if WordPress is a CMS, and Pods is a plugin that acts as a CMS framework for WordPress, how (and why) can you use them at the same time?</p>
<p>While you can technically accomplish the same functionality with an out-of-the-box copy of WordPress using a crazy blend of nested Pages, categorized Posts, and a ton of <a href="http://codex.wordpress.org/Custom_Fields">Custom Fields</a>, Pods helps abstract that desired &#8216;next level&#8217; of functionality you&#8217;re looking for as a WordPress developer.</p>
<p>Trying to explain what Custom Fields are and how to use them to a client isn&#8217;t something I look fondly upon. While it&#8217;s super for developers, to the rest of the world it&#8217;s terribly bulky and unintuitive. I think Custom Fields are <strong>an awesome</strong> available resource for plugin developers, but they&#8217;re one of those things better left unseen to the novice user. Pods brings the ability to work with custom <em>pieces</em> of data to the client, all the while giving developers a terrific extended platform to build upon. If you find yourself repeatedly using custom fields within your WordPress sites, especially for clients, you&#8217;re probably ready for <a href="http://pods.uproot.us/">Pods</a>.</p>
<h4>The Pods CMS Series on <abbr title="Monday By Noon">MBN</abbr></h4>
<p>This article is the <strong>first</strong> in a series for Monday By Noon dedicated to <a href="http://pods.uproot.us/">Pods CMS</a>.</p>
<ol>
<li><a href="http://mondaybynoon.com/2010/01/04/introduction-to-pods-cms-wordpress/">An Overview of and Introduction to Pods CMS for WordPress</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pods-basics-installation-and-setup/">Pods Basics: Installation and Setup</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pulling-pods-data/">Pods Basics: Pulling Pods Data to your Theme</a></li>
<li><a href="http://mondaybynoon.com/2010/01/04/pods-ui-intro/">Pods UI: The Latest and Greatest Addition to Pods</a></li>
<li><a href="http://mondaybynoon.com/2010/01/11/how-to-use-pick-columns-relationships-in-pods/">How to use Pick Columns (Relationships) in Pods</a></li>
<li><a href="http://mondaybynoon.com/2010/01/25/pods-pagination-sorting/">The Last of the Pods Basics: Pagination and Sorting</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://mondaybynoon.com/2010/01/04/introduction-to-pods-cms-wordpress/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 9/15 queries in 0.011 seconds using disk

Served from: mondaybynoon.com @ 2010-09-09 12:58:47 -->