<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>WordPress Tutorials | Freebies for WordPress | WP Roots</title>
	
	<link>http://www.wproots.com</link>
	<description>Only the Finest WordPress Tutorials</description>
	<lastBuildDate>Thu, 25 Oct 2012 17:52:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/WPRoots" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="wproots" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Easy Digital Downloads</title>
		<link>http://www.wproots.com/easy-digital-downloads/</link>
		<comments>http://www.wproots.com/easy-digital-downloads/#comments</comments>
		<pubDate>Thu, 25 Oct 2012 17:49:21 +0000</pubDate>
		<dc:creator>pippin</dc:creator>
				<category><![CDATA[Plugin Spotlight]]></category>

		<guid isPermaLink="false">http://www.wproots.com/?p=1767</guid>
		<description><![CDATA[Easy Digital Downloads is a plugin built specifically for selling digital products. It has been designed around the needs of those people selling digital products, rather than around the idea of physical products with digital as a side feature, as most ecommerce plugins are. The plugin is still relatively new but has already garnered a...]]></description>
			<content:encoded><![CDATA[<p>Easy Digital Downloads is a plugin built specifically for selling digital products. It has been designed around the needs of those people selling digital products, rather than around the idea of physical products with digital as a side feature, as most ecommerce plugins are. The plugin is still relatively new but has already garnered a huge response from the WordPress community.<br />
<span id="more-1767"></span><br />
Since its release in April, Easy Digital Downloads has seen over 27,000 downloads on <a href="http://wordpress.org/extend/plugins/easy-digital-downloads/" target="_blank">WordPress.org</a>, a nearly perfect 5 star rating, and some very rapid development that is constantly enhancing the plugin even further.</p>
<p>Let&#8217;s look at some of the features of the plugin:</p>
<p><strong>Shopping Cart</strong></p>
<p>It may seem like common sense for an ecommerce plugin to include a shopping cart, but it&#8217;s actually pretty rare for purely digital sales to include a cart system. None of the other digital-goods focused ecommerce plugins include one, and nor do the industry giants like Theme Forest (The Mojo marketplaces do though <img src='http://www.wproots.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ). The ability to purchase multiple products are once is huge.</p>
<p><a href="http://www.wproots.com/wp-content/uploads/2012/10/Screen-Shot-2012-10-25-at-12.13.51-PM.png" rel="wp-prettyPhoto[g1767]"><img class="aligncenter size-medium wp-image-1771" src="http://www.wproots.com/wp-content/uploads/2012/10/Screen-Shot-2012-10-25-at-12.13.51-PM-300x249.png" alt="" width="300" height="249" /></a></p>
<p><strong>Powerful Reporting</strong></p>
<p>Easy Digital Downloads includes a reporting system that can show you earnings graphs for the current month, previous month, current quarter, last quarter, current year, last year, and any other custom date range. It also has reporting features that can show you your top grossing downloads, including their average monthly earnings / sales, and also a reporting system on customers. Want to find who your best customer is? Easy.</p>
<p style="text-align: center;"><a href="http://www.wproots.com/wp-content/uploads/2012/10/Screen-Shot-2012-10-25-at-12.15.36-PM.png" rel="wp-prettyPhoto[g1767]"><img class="size-medium wp-image-1772 aligncenter" src="http://www.wproots.com/wp-content/uploads/2012/10/Screen-Shot-2012-10-25-at-12.15.36-PM-300x141.png" alt="" width="300" height="141" /></a></p>
<p><strong>Lightweight</strong></p>
<p>While still being very powerful, Easy Digital Downloads is also very lightweight. Rather than impose its own unique styling to your store pages (as most ecommerce plugins do), Easy Digital Downloads lets your current theme dictate most of the styling, which makes a seamless integration much easier. This also means that EDD works with the vast majority of all WordPress themes without having drastic styling clashes.</p>
<p><strong>Simple and Variable Download Pricing</strong></p>
<p>The plugin includes the option to set a simple, single price for each download product as well as the option to enable Variable Prices, which give you the ability to create multiple prices the buyer can choose from. You can also dictate which files the buyer receives depending on which price they choose.</p>
<p><a href="http://www.wproots.com/wp-content/uploads/2012/10/Screen-Shot-2012-10-25-at-12.19.37-PM.png" rel="wp-prettyPhoto[g1767]"><img class="aligncenter size-medium wp-image-1773" src="http://www.wproots.com/wp-content/uploads/2012/10/Screen-Shot-2012-10-25-at-12.19.37-PM-300x202.png" alt="" width="300" height="202" /></a></p>
<p><strong>Extensive Documentation</strong></p>
<p>Every aspect and more of the plugin has been <a href="http://easydigitaldownloads.com/documentation/" target="_blank">documentated</a> and the documentation is being improved every single week.</p>
<p><strong>Highly Extendable</strong></p>
<p>One of the aspects that makes Easy Digital Downloads truly powerful is how extendable it is. This means that add-on plugins can be written to further enhance the default functionality. There are currently over <a href="https://easydigitaldownloads.com/extensions/" target="_blank">50 extensions available</a> and some of the highlights include:</p>
<ul>
<li><a href="https://easydigitaldownloads.com/extension/affiliates-pro-integration-pack/" target="_blank">Affiliates Pro Integration</a> for providing a complete affiliate tracking and management system inside your WordPress install.</li>
<li><a href="https://easydigitaldownloads.com/extension/software-licensing/" target="_blank">Software Licensing</a> for generating and tracking license keys as well as serving automatic updates to WordPress products.</li>
<li><a href="https://easydigitaldownloads.com/extension/commissions/" target="_blank">Commissions</a> for automatically tracking and paying out commissions to multiple users when products sale.</li>
<li><a href="https://easydigitaldownloads.com/extension/paypal-pro-express/" target="_blank">Payment gateway</a> for accepting credit card payments through PayPal Pro.</li>
<li><a href="https://easydigitaldownloads.com/extension/edd-social-links/" target="_blank">EDD Social Links</a> for adding social sharing icons to download pages.</li>
<li><a href="https://easydigitaldownloads.com/extension/mail-chimp/" target="_blank">Mail Chimp</a> integration for automatically signing up buyers to your Mail Chimp newsletters.</li>
<li><a href="https://easydigitaldownloads.com/extension/authorize-net-gateway/" target="_blank">Payment gateway</a> for accepting credit cards through Authorize.net</li>
<li><a href="https://easydigitaldownloads.com/extension/pushover-notifications/" target="_blank">Pushover Notifications</a> for getting sales and earnings reports pushed directly to your phone.</li>
<li><a href="https://easydigitaldownloads.com/extension/pdf-invoices/" target="_blank">PDF Invoices</a> that let your buyers download PDF invoice receipts.</li>
<li><a href="https://easydigitaldownloads.com/extension/stripe-payment-gateway/" target="_blank">Payment gateway</a> for accepting credit card payments through Stripe.com.</li>
<li><a href="https://easydigitaldownloads.com/extension/edd-slider/" target="_blank">EDD Slider</a> for showing a fully-responsive image slider on the product pages.</li>
<li><a href="https://easydigitaldownloads.com/extension/amazon-s3/" target="_blank">Amazon S3</a> integration for delivering download files from your Amazon S3 CDN storage.</li>
</ul>
<p><a href="https://easydigitaldownloads.com/" target="_blank">Download the Plugin</a>.</p>
<p style="border: 1px solid; border-color: #E6DB55; padding: 15px; background-color: #ffffe0; color: #524e1d; margin-top: 15px; margin-bottom: 15px;"><strong>Note:</strong> You can also <a href="http://www.mojo-code.com/categories/wordpress/ecommerce/easy-digital-downloads/">buy Easy Digital Downloads plugins</a> on Mojo-Code</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wproots.com/easy-digital-downloads/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Announcing Mojo-Code Marketplace</title>
		<link>http://www.wproots.com/announcing-mojo-code-marketplace/</link>
		<comments>http://www.wproots.com/announcing-mojo-code-marketplace/#comments</comments>
		<pubDate>Fri, 12 Oct 2012 18:11:12 +0000</pubDate>
		<dc:creator>Brady Nord</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Announcement]]></category>
		<category><![CDATA[Mojo-Code]]></category>

		<guid isPermaLink="false">http://www.wproots.com/?p=1752</guid>
		<description><![CDATA[I am really excited to announce the launch of Mojo-Code.com. Mojo-Code is a premium code marketplace for all things code related. Yes its true that the marketplace will sell more than just WordPress plugins, we feel that WordPress plugins will be the flagship category. Mojo-code is the second marketplace to be launched from the Mojoness...]]></description>
			<content:encoded><![CDATA[<p>I am really excited to announce the launch of Mojo-Code.com. Mojo-Code is a <a title="premium code marketplace" href="http://www.mojo-code.com/">premium code marketplace</a> for all things code related. Yes its true that the marketplace will sell more than just WordPress plugins, we feel that WordPress plugins will be the flagship category. Mojo-code is the second marketplace to be launched from the Mojoness team and we couldn&#8217;t be more excited.</p>
<p>We have plans to launch many more tutorials here on WP Roots related to working with WordPress code and scripts which should hopefully help you better understand the Mojo-Code marketplace.</p>
<p>Mojo-Code launched with 17 <a title="WordPress Plugins" href="http://www.mojo-code.com/categories/wordpress/">WordPress plugins</a> and we are seeing many uploads everyday so be sure to check it out!</p>
<p>With the launch of the new marketplace, we have added some new features that are specific to selling code such as video demos,<a title="Mojo-Code Integration tools" href="http://www.mojo-code.com/2012/10/mojo-code-item-integration/"> integration time</a> and steps just to name a few. Let us know your thoughts about the new code marketplace.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wproots.com/announcing-mojo-code-marketplace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Review of WordPress Options Panels</title>
		<link>http://www.wproots.com/wordpress-options-panels/</link>
		<comments>http://www.wproots.com/wordpress-options-panels/#comments</comments>
		<pubDate>Fri, 24 Aug 2012 19:44:14 +0000</pubDate>
		<dc:creator>ivelina</dc:creator>
				<category><![CDATA[How To's]]></category>
		<category><![CDATA[Inter]]></category>
		<category><![CDATA[Option Panels]]></category>
		<category><![CDATA[Recommended Practices]]></category>
		<category><![CDATA[Theme Options]]></category>

		<guid isPermaLink="false">http://www.wproots.com/?p=1711</guid>
		<description><![CDATA[Started as a blog platform, today WordPress is turned into a powerful CMS with great options for everyone to create and maintain his own bussiness or personal site. Every year and with every new vesrion we can find more and more useful features about WordPress. Also you are able to find a lot of free...]]></description>
			<content:encoded><![CDATA[<p style="text-align: left"><span style="font-size: small">Started as a blog platform, today WordPress is turned into a powerful CMS with great options for everyone to create and maintain his own bussiness or personal site. Every year and with every new vesrion we can find more and more useful features about WordPress. Also you are able to find a lot of free and premium themes to design your project and plugins to adjust its functinality, and why not to create your own theme or plugin.</span></p>
<p><span style="font-size: small">To create a WordPress theme is not a high level astronaut job – you can learn how to do it in some simple steps. When you finish with the design and set your new theme you would like to give your users some options – this will help them to create unique look of their site and to avoid some features that they don&#8217;t really use to make their project faster and easier to use.</span></p>
<p><span style="font-size: small">So today we will explore how to use popular theme options frameworks for our theme. This will help you to spend more time to the real theme creation and in the same time to add some interesting and helpful options with not so much coding.</span></p>
<p><strong><span style="font-size: small">First of all let&#8217;s take a look to some popular ways to create theme options:</span></strong></p>
<ol>
<li><span style="font-size: small"><em>Theme Options Plugin</em> – this is a free and a really good plugin that offers you a lot of good features like color pickers and image radio buttons, it can be downloaded by the <a href="http://wordpress.org/extend/plugins/options-framework/">official WordPress repository</a> and from the site of his author</span><span style="color: #000000"><span style="font-size: small"><a href="http://wptheming.com/options-framework-plugin/"> Devin Price</a>. Also the author presents a demo theme to help you learn how to use the plugin, some additional educational examples and documentation – could be found on <a href="http://wptheming.com/options-framework-plugin/">his site</a>. After you download the plugin and take a look to the demo theme you need to copy the options.php in your theme and change the “options” array in accordance to your needs. Next step is to add the function in your function.php file to relate the options framework to your theme and you are ready to go. This framework offers a lot of different field types:</span></span></li>
</ol>
<ul>
<li><span style="color: #333333"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">textarea</span></span></span></li>
<li><span style="color: #000000"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">text</span></span></span></li>
<li><span style="color: #333333"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">checkbox</span></span></span></li>
<li><span style="color: #333333"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">select</span></span></span></li>
<li><span style="color: #333333"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">radio</span></span></span></li>
<li><span style="color: #333333"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">upload (an image uploader)</span></span></span></li>
<li><span style="color: #333333"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">images (use images instead of radio buttons)</span></span></span></li>
<li><span style="color: #333333"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">background (a set of options to define a background)</span></span></span></li>
<li><span style="color: #333333"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">multicheck</span></span></span></li>
<li><span style="color: #333333"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">color (a jquery color picker)</span></span></span></li>
<li><span style="color: #333333"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">typography (a set of options to define typography)</span></span></span></li>
<li><span style="color: #333333"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">editor</span></span></span></li>
</ul>
<p><a href="http://www.wproots.com/wp-content/uploads/2012/08/options-framework.png" rel="wp-prettyPhoto[g1711]"><img class="wp-image-1714 aligncenter" src="http://www.wproots.com/wp-content/uploads/2012/08/options-framework-950x1024.png" alt="" width="348" height="375" /></a><span style="color: #000000"><br />
</span></p>
<ol start="2">
<li><span style="color: #000000"><span style="font-size: small"><a href="https://github.com/leemason/NHP-Theme-Options-Framework/wiki">NHP Theme Options</a> by Lee Mason is another choise for the theme creators. Of course it is based on the Setting API but it comes with a lot of field types and makes your job easier. The main point is that you have to def</span></span><span style="color: #000000"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">ine </span></span></span><code><span style="color: #111111"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">$NHP_Options </span></span></span></code><span style="color: #111111"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">global and then to use it&#8217;s </span></span></span><code><span style="color: #111111"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">get </span></span></span></code><span style="color: #111111"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">or </span></span></span><code><span style="color: #111111"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">show </span></span></span></code><span style="color: #111111"><span style="font-family: 'Times New Roman', serif"><span style="font-size: small">methods. NHP Theme Options includes build-in validation, great default settings and<a href="https://github.com/leemason/NHP-Theme-Options-Framework/wiki"> good documentation</a> posted in GitHub that can help you a lot.</span></span></span></li>
</ol>
<div style="text-align: center"><a href="http://www.wproots.com/wp-content/uploads/2012/08/NHP-options.png" rel="wp-prettyPhoto[g1711]"><img class="alignnone size-medium wp-image-1720" src="http://www.wproots.com/wp-content/uploads/2012/08/NHP-options-300x183.png" alt="" width="300" height="183" /></a></div>
<div style="text-align: center"></div>
<div style="text-align: center">Dev options explanation:</div>
<div style="text-align: center"><a href="http://www.wproots.com/wp-content/uploads/2012/08/NHP-options-dev.png" rel="wp-prettyPhoto[g1711]"><img class="alignnone size-medium wp-image-1721" src="http://www.wproots.com/wp-content/uploads/2012/08/NHP-options-dev-300x183.png" alt="" width="300" height="183" /></a></div>
<p><span style="color: #111111"><br />
</span></p>
<ol start="3">
<li><span style="color: #000000"><span style="font-size: small">ProPanel is paid (15$) but а good solution if you need customer support and a big selection of ready for you options, it has plug-and-play set up, a lot of training videos and a dashboard styling that is easy to your clients and can be changed with the default WordPress dashboard layouts. The principle  is similar – you need to create the code for your options page and to add the options array you need. The parameters are  explained in a good manner in the <a href="http://vimeopro.com/truethemes/codecanyon-propanel">video tutorials</a>, actualy you just need to look to the example and change them to what you need. Simple enough.</span></span></li>
</ol>
<p style="text-align: center"><a href="http://www.wproots.com/wp-content/uploads/2012/08/pro-panel.png" rel="wp-prettyPhoto[g1711]"><img class="alignnone size-medium wp-image-1724" src="http://www.wproots.com/wp-content/uploads/2012/08/pro-panel-300x214.png" alt="" width="300" height="214" /></a><span style="color: #000000"><br />
</span></p>
<ol start="4">
<li><span style="font-size: small"><a href="https://github.com/cheezburger/cheezcap">CheezCap – Cheezburger Custom Administration Panel </a>is another library for creating a simple theme options – doesn&#8217;t offer such a big variety of the options field but it is easier and faster to use. It is not updated recently so you will have to check if is complatible with your WordPress version. On the other hand it is free and well documented in GitHub. How it works – you need to add the CheezCap folder to your theme, to require cheezcap.php in your functions.php file and then to create your options in cheezcap/config.php. The actual options creation is related to editing an array in function cap_get_options() where you need to create “Group” objects that accepts the following parameters: Name, ID, Options array (here are your actual options). Each Group will appear in different options tab in your theme and you need to add a relevant code in your theme file to tell them what is happening when some option is chosen.</span></li>
</ol>
<p style="text-align: center"><a href="http://www.wproots.com/wp-content/uploads/2012/08/CheezCap-Settings.png" rel="wp-prettyPhoto[g1711]"><img class="alignnone size-medium wp-image-1722" src="http://www.wproots.com/wp-content/uploads/2012/08/CheezCap-Settings-e1345370203489-300x167.png" alt="" width="300" height="167" /></a><span style="font-size: small"><br />
</span></p>
<ol start="5">
<li><span style="font-size: small"><a href="http://upthemes.com/upthemes-framework/">Up Themes Framework</a> is another popular solution and it will be a very good choise as it can provide image management with resize options, import/export of the created settings, Layout and SEO management, Color Scheme picker and more. Also there are a lot of working examples to help you understand the way it works.  It is free and available in <a href="https://github.com/LiftUX/UpThemes-Framework">GitHub</a>. The way of work is similar &#8211; you need to add the framework folder to your theme and to require it in theme functions.php file. To make yout own options you need to create a page in theme options folder where to set your custom array for the new options. The authors have provided a<a href="http://liftux.github.com/UpThemes-Framework/"> guide for developers</a> if you want to include the framework in your own theme.</span></li>
</ol>
<div><span style="font-size: x-small"><a href="http://www.wproots.com/wp-content/uploads/2012/08/up-themes.png" rel="wp-prettyPhoto[g1711]"><img class="size-medium wp-image-1729 aligncenter" src="http://www.wproots.com/wp-content/uploads/2012/08/up-themes-300x144.png" alt="" width="300" height="144" /></a></span></div>
<p><span style="font-size: small"><br />
</span></p>
<p><span style="color: #333333"><span style="font-size: small"><strong>How to chose Theme Options Framework: </strong></span></span></p>
<ol>
<li><span style="color: #333333"><span style="font-size: small">The most of the presented frameworks are working in a similar way, there are differences of course but they are very well specified in the documentations. No matter which one you will choose you will have to learn more about code and Setting API to be able to work with them</span></span></li>
<li><span style="color: #333333"><span style="font-size: small">The first thing you need to do before start adding options to your theme is to make a simple list what kind ot options do you need. This will make your choose more obvious – if you need specific type of fields you will pick the framework that offers that field or may be you have plans to create a lot of different themes – then your choice gonna be related to the solution that offers you import/ export options or you just want to have some simple and easy options – then it is better to use lighter and faster framework</span></span></li>
<li><span style="color: #333333"><span style="font-size: small">Other good advice before you choose the best framework for your theme is to check if it is updated recently and is compatible with WordPress current version. </span></span><span style="color: #333333"><span style="font-size: small">Once you have made your choise it is time to implement the desired options. This can be done in a similar manner and of course depends by your choise. The main point is that you have the following steps: installing or adding the framework/plugin, include the options &#8211; in the most cases in function.php file of your theme. After that you just need to change the options to these you need by eddting the array of options and it&#8217;s parameters. The most of the frameworks have pretty good examples to help you understand the functions easier. This is a really brief summary because we are not looking to the specific framework but these are the main points you should follow.</span></span></li>
</ol>
<div><span style="color: #333333;font-size: x-small"><br />
</span></div>
<p><span style="color: #333333"><span style="font-size: small">Finally the Theme Options Frameworks are really useful tools that can help you develop interesting and popular WordPress theme. You will need to spend some time to learn how any of them is working but this is good investment because it will help to your clients and users to choose your theme and be happy using it. Also this will help you to work faster and create a lot more features with every theme. So take a look, try and choose the best solution that fits to your desires and needs and you will be really suprised how easy will be to create awesome new options for your themes. </span></span></p>
<p><span style="font-size: small"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wproots.com/wordpress-options-panels/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Freebie! MOJONESS Ticket PSD</title>
		<link>http://www.wproots.com/freebie-mojoness-ticket-psd/</link>
		<comments>http://www.wproots.com/freebie-mojoness-ticket-psd/#comments</comments>
		<pubDate>Fri, 03 Aug 2012 19:17:51 +0000</pubDate>
		<dc:creator>curtisallen</dc:creator>
				<category><![CDATA[Freebie]]></category>
		<category><![CDATA[PSD]]></category>
		<category><![CDATA[Ticket]]></category>
		<category><![CDATA[Ticket PSD]]></category>

		<guid isPermaLink="false">http://www.wproots.com/?p=1615</guid>
		<description><![CDATA[Today’s freebie is a Ticket PSD. If you have any projects that deal with making a ticket, please feel free to use this ticket in it. Also, please follow me on Twitter or Mojo Themes. Feel free to download and use on all your awesome themes and items!...]]></description>
			<content:encoded><![CDATA[<p>Today’s freebie is a Ticket PSD.  If you have any projects that deal with making a ticket, please feel free to use this ticket in it. Also, please follow me on <a title="Follow Curtis on Twitter" href="http://www.twitter.com/curtisaallen">Twitter</a> or <a title="Follow Curtis on MOJO" href="http://www.mojo-themes.com/user/curtisaallen">Mojo Themes</a>.</p>
<p>Feel free to download and use on all your awesome themes and items!</p>
<p> <img src="http://www.wproots.com/wp-content/uploads/2012/07/ticket.png" alt="Ticket PSD" /></p>
<div id="ss-downloads">
	<h4 style="text-align: center;">Download MOJONESS Ticket PSD</h4>
	<p>Enter your email and we will gladly email you the download link!</p>

        
    <form action="http://www.wproots.com/wp-content/plugins/ss-downloads/services/addemail.php" method="post">
        <input class="input-text" placeholder="Enter your email address..." type="text" name="email" value="" />
        <input type="hidden" name="title" value="MOJONESS Ticket PSD" />
        <input type="hidden" name="file" value="Xffv://CRR.Ca/xMxZl" />
        <input type="submit" value="Get Freebie!" id="submit" />
        <input type="hidden" name="postid" value="1615" />
    </form>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.wproots.com/freebie-mojoness-ticket-psd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Guide to understanding Meta Data and when to use it</title>
		<link>http://www.wproots.com/guide-to-understanding-meta-data-and-when-to-use-it/</link>
		<comments>http://www.wproots.com/guide-to-understanding-meta-data-and-when-to-use-it/#comments</comments>
		<pubDate>Wed, 01 Aug 2012 17:46:38 +0000</pubDate>
		<dc:creator>mariopeshev</dc:creator>
				<category><![CDATA[Developing for WordPress]]></category>
		<category><![CDATA[How To's]]></category>
		<category><![CDATA[Meta Boxes]]></category>
		<category><![CDATA[Custom Fields]]></category>
		<category><![CDATA[Meta Data]]></category>
		<category><![CDATA[WordPress Meta]]></category>

		<guid isPermaLink="false">http://www.wproots.com/?p=1672</guid>
		<description><![CDATA[WordPress started as a blogging platform and turned itself into a powerful CMS, running a variety of mid-size and large projects all over the world. Posts and pages are the beginning of the custom post type generation, just like categories and tags form the first pair of custom taxonomies. How about all the properties that...]]></description>
			<content:encoded><![CDATA[<p>WordPress started as a blogging platform and turned itself into a powerful CMS, running a variety of mid-size and large projects all over the world. Posts and pages are the beginning of the custom post type generation, just like categories and tags form the first pair of custom taxonomies. How about all the properties that we want to add to our items? Custom fields are on the right track for this venture.</p>
<h2>What are Custom Fields?</h2>
<p>In simple words custom fields are additional information that you can add in Posts and Pages, as well as to any custom post type defined to your system. A good starting point is to check the <a class="vt-p" title="WordPress Codex" href="http://codex.wordpress.org/" target="_blank">WordPress Codex</a>, where <a class="vt-p" title="Using_Custom_Fields" href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">custom fields</a> are described in details and you can find some examples.</p>
<p>In our tutorial we will add <strong>Product Name</strong> and <strong>Product price</strong> to the post and we will display it bellow the <strong>post title</strong>. Also we will make price discount for our registered users.</p>
<p><span id="more-1672"></span></p>
<h2>Setting the stage</h2>
<p>We have to enable (if not enabled already) <strong>Custom Fields</strong> from <strong>Screen Options</strong> in our <strong>Post Editor</strong>.</p>
<p><a href="http://www.wproots.com/wp-content/uploads/2012/08/screen_options_custom_fields.png" rel="wp-prettyPhoto[g1672]"><img class="aligncenter size-large wp-image-1677" src="http://www.wproots.com/wp-content/uploads/2012/08/screen_options_custom_fields-1024x182.png" alt="" width="580" height="103" /></a></p>
<p>When we are ready the <strong>Custom Fields Area</strong> should be visible right bellow our<strong> WYSIWYG post editor</strong>.</p>
<h2>Adding our first Custom Field</h2>
<p>Go to <strong>Custom Fields</strong> and click the &#8220;<strong>Enter New</strong>&#8221; button.</p>
<p><a href="http://www.wproots.com/wp-content/uploads/2012/08/custom_fields_add_new.png" rel="wp-prettyPhoto[g1672]"><img class="aligncenter size-full wp-image-1675" src="http://www.wproots.com/wp-content/uploads/2012/08/custom_fields_add_new.png" alt="" width="580" height="254" /></a></p>
<p>In the &#8220;<strong>Name</strong>&#8220;field we should define the name of our Custom Filed (in our case &#8220;<em>product_name</em>&#8220;) and in &#8220;<strong>Value</strong>&#8221; &#8211; our custom filed&#8217;s value (for instance, &#8220;<em>Butterflies</em>&#8220;).</p>
<p>Now, click on &#8220;<strong>Add Custom Filed</strong>&#8221; button and there we go &#8211; we have created our first custom filed.</p>
<p><a href="http://www.wproots.com/wp-content/uploads/2012/08/custom_filed_product_name.png" rel="wp-prettyPhoto[g1672]"><img class="aligncenter size-full wp-image-1676" src="http://www.wproots.com/wp-content/uploads/2012/08/custom_filed_product_name.png" alt="" width="580" height="293" /></a></p>
<p>We can repeat step two and do the same, but this time we will add product price.</p>
<p>Again we go to Custom Fields, click Enter New. For Name add <em>product_price</em> and for Value add <em>100</em>.</p>
<p>Now we have our two Custom Fields and we can proceed to the next step.</p>
<p><a href="http://www.wproots.com/wp-content/uploads/2012/08/two_custom_fields.png" rel="wp-prettyPhoto[g1672]"><img class="aligncenter size-full wp-image-1673" src="http://www.wproots.com/wp-content/uploads/2012/08/two_custom_fields.png" alt="" width="580" height="438" /></a></p>
<h2>Display our Custom Fields below Post title.</h2>
<p>For the sake of our example we would be using a <strong>basic WordPress installation</strong> and display our content based on the <strong>Twenty Eleven</strong> theme.</p>
<p>Now go to <strong>Appearance =&gt; Editor</strong> and from <strong>Twenty Eleven</strong> files choose <em>content-single.php</em>(or <em>single.php</em>, it depends of your WordPress theme).</p>
<p>We have to display Product Name and Product Price bellow Post title, so will place our code somewhere bellow Post title.</p>
<p><a href="http://www.wproots.com/wp-content/uploads/2012/08/appearance_editor_content_single.png" rel="wp-prettyPhoto[g1672]"><img class="aligncenter size-large wp-image-1674" src="http://www.wproots.com/wp-content/uploads/2012/08/appearance_editor_content_single-1024x406.png" alt="" width="580" height="229" /></a></p>
<p>We will use <a class="vt-p" title="get_post_meta WordPress function" href="http://codex.wordpress.org/Function_Reference/get_post_meta" target="_blank">get_post_meta()</a> WordPress and <a class="vt-p" title="update_post_meta WordPress function" href="http://codex.wordpress.org/Function_Reference/update_post_meta" target="_blank">update_post_meta()</a> functions.</p>
<blockquote><p>&lt;?php<br />
/*<br />
* We will use this place for our Custom Fileds<br />
*/</p>
<p>// set defaults for our name and price should they be empty</p>
<p>$product_name_def = &#8216;Default name&#8217;;</p>
<p>$product_price_def = 0;</p>
<p>$product_name = get_post_meta($post-&gt;ID, &#8216;product_name&#8217;, true);<br />
// check if the custom field has a value<br />
if (empty ( $product_name )) {<br />
$product_name = $product_name_def;<br />
}</p>
<p>$product_price = get_post_meta($post-&gt;ID, &#8216;product_price&#8217;, true);<br />
// check if the custom field has a value<br />
if ( empty( $product_price ) ) {<br />
$product_price = $product_price_def;<br />
}</p>
<p>$vat = 1.2;<br />
$product_price_vat = ($product_price * $vat);</p>
<p>$product_price_updated = update_post_meta($post-&gt;ID, &#8216;product_price_vat&#8217;, $product_price_vat);</p>
<p>if (is_user_logged_in()) {<br />
echo &#8216;The price of &lt;strong&gt;&#8217;. $product_name .&#8217;&lt;/strong&gt; is: &lt;strong&gt;$&#8217;. $product_price .&#8217;&lt;/strong&gt;.&#8217;;<br />
} else {<br />
echo &#8216;The price of &lt;strong&gt;&#8217;. $product_name .&#8217;&lt;/strong&gt; is: &lt;strong&gt;$&#8217;. $product_price_vat .&#8217;&lt;/strong&gt;.&#8217;;<br />
}<br />
?&gt;</p></blockquote>
<p><a href="http://www.wproots.com/wp-content/uploads/2012/08/the_code.png" rel="wp-prettyPhoto[g1672]"><img class="aligncenter size-large wp-image-1678" src="http://www.wproots.com/wp-content/uploads/2012/08/the_code-1024x449.png" alt="" width="580" height="254" /></a></p>
<p>Let&#8217;s revise the sample code above.<br />
We use the <em>get_post_meta($post_id, $key, $single);</em> function.</p>
<p>where:</p>
<p><em>$post_id</em> &#8211; The ID of the post from which you want the data. Use $post-&gt;ID to get a post&#8217;s ID.<br />
<em>$key</em> &#8211; A string containing the name of the meta value you want.<br />
<em>$single</em> &#8211; this is a <strong>boolean variable</strong>. When it’s set to <strong>true</strong>, it returns the value as a string. A custom field can have multiple values, in which case you would set this variable to <strong>false</strong>, returning an <strong>array</strong> instead.</p>
<p>And also we use update_post_meta($post_id, $meta_key, $meta_value);</p>
<p>where:</p>
<p><em>$post_id</em> - The ID of the post from which you want the data. Use $post-&gt;ID to get a post&#8217;s ID.</p>
<p><em>$meta_key</em> &#8211; is the key of the custom field you will edit.</p>
<p><em>$meta_value</em> &#8211; is the new value of the custom field.</p>
<p>Using the <em>is_user_logged_in()</em> function creates a scenario for our sample where logged users of ours see the flat price of our product where regular visitors are only able to see the price with VAT added.</p>
<h2>The Result</h2>
<p>Logged user:</p>
<p><a href="http://www.wproots.com/wp-content/uploads/2012/08/the_result_logged_user.png" rel="wp-prettyPhoto[g1672]"><img class="aligncenter size-full wp-image-1679" src="http://www.wproots.com/wp-content/uploads/2012/08/the_result_logged_user.png" alt="" width="580" height="286" /></a></p>
<p>Regular user (non-logged):</p>
<p><a href="http://www.wproots.com/wp-content/uploads/2012/08/the_result_not_logged_user.png" rel="wp-prettyPhoto[g1672]"><img class="aligncenter size-full wp-image-1680" src="http://www.wproots.com/wp-content/uploads/2012/08/the_result_not_logged_user.png" alt="" width="580" height="287" /></a></p>
<p>And in our post editor you will notice that we have third custom filed <strong>product_price_vat</strong> added automatically from WordPress.</p>
<p><a href="http://www.wproots.com/wp-content/uploads/2012/08/third_custom_field.png" rel="wp-prettyPhoto[g1672]"><img class="aligncenter size-full wp-image-1681" src="http://www.wproots.com/wp-content/uploads/2012/08/third_custom_field.png" alt="" width="580" height="519" /></a></p>
<h2>Conclusion</h2>
<p>Custom fields are a powerful engine helping us to define extra data to our posts or custom post types. You can extend this scenario and use the standard post types available in your setup and add different field types: price, area (for real estates), dimensions (for some property), age (for user profiles) and so on. With further actions you can apply validation rules and assign them to your custom fields, operate with 3rd party APIs such as Google Maps or Real Estate catalogs &#8211; everything within your WordPress installation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wproots.com/guide-to-understanding-meta-data-and-when-to-use-it/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Options for Responsive Themes</title>
		<link>http://www.wproots.com/options-for-responsive-themes/</link>
		<comments>http://www.wproots.com/options-for-responsive-themes/#comments</comments>
		<pubDate>Mon, 30 Jul 2012 22:00:14 +0000</pubDate>
		<dc:creator>Brady Nord</dc:creator>
				<category><![CDATA[Developing for WordPress]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[How To's]]></category>
		<category><![CDATA[Recommended Practices]]></category>
		<category><![CDATA[Selling WordPress Themes]]></category>
		<category><![CDATA[responsive]]></category>

		<guid isPermaLink="false">http://www.wproots.com/?p=1655</guid>
		<description><![CDATA[Over the past six months it seems that there has been a large push for responsive design so I felt it necessary to layout a few different options for your next WordPress theme. Below is a list of recommended frameworks and grid systems to get started with. Bootstrap from Twitter 12-column grid with fixed and...]]></description>
			<content:encoded><![CDATA[<p>Over the past six months it seems that there has been a large push for responsive design so I felt it necessary to layout a few different options for your next WordPress theme. Below is a list of recommended frameworks and grid systems to get started with.</p>
<h2><a title="Bootstrap from Twitter" href="http://twitter.github.com/bootstrap/scaffolding.html" target="_blank">Bootstrap from Twitter</a></h2>
<p><em>12-column grid with fixed and fluid width layouts</em></p>
<h2><a title="Get Skeleton" href="http://www.getskeleton.com/" target="_blank">Skeleton</a></h2>
<p><em>960px grid system</em></p>
<h2><a title="Columnal" href="http://www.columnal.com/" target="_blank">Columnal</a></h2>
<p><em>1140px fluid width system</em></p>
<h2><a title="1140 CSS Grid" href="http://cssgrid.net/" target="_blank">1140 CSS Grid</a></h2>
<p><em>12 column fluid system that starts at 1280px</em></p>
<h2><a title="Gumby Framework" href="http://www.gumbyframework.com/" target="_blank">Gumby Framework</a></h2>
<p><em>960px grid with fluid or fixed layouts</em></p>
<h2><a title="Foundation 3" href="http://foundation.zurb.com/" target="_blank">Foundation 3</a></h2>
<p><em>12 column fluid system</em></p>
<hr />
<p>The above list is by no means comprehensive although I have personally used many of these options and would recommend them for your next WordPress theme. Feel free to take a look at these options and let me know what you prefer to use for your themes.</p>
<p style="border: 1px solid; border-color: #E6DB55; padding: 15px; background-color: #ffffe0; color: #524e1d; margin-top: 15px; margin-bottom: 15px;"><strong>Need inspiration:</strong> Take a look at some of these amazing <a href="http://www.mojo-themes.com/responsive-wordpress-themes/" title="Responsive WordPress Themes">responsive WordPress themes</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wproots.com/options-for-responsive-themes/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Freebie! MOJONESS Browser PSD</title>
		<link>http://www.wproots.com/freebie-mojoness-browser-psd/</link>
		<comments>http://www.wproots.com/freebie-mojoness-browser-psd/#comments</comments>
		<pubDate>Fri, 27 Jul 2012 16:31:25 +0000</pubDate>
		<dc:creator>curtisallen</dc:creator>
				<category><![CDATA[Freebie]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[Browser PSD]]></category>
		<category><![CDATA[PSD]]></category>

		<guid isPermaLink="false">http://www.wproots.com/?p=1622</guid>
		<description><![CDATA[Today’s freebie is a Browser PSD. I hope this browser PSD can help you when you are creating mock-ups. Also, please follow me on Twitter or Mojo Themes. Feel free to download and use on all your awesome themes and items!...]]></description>
			<content:encoded><![CDATA[<p>Today’s freebie is a Browser  PSD. I hope this browser PSD can help you when you are creating mock-ups. Also, please follow me on <a title="Follow Curtis on Twitter" href="http://www.twitter.com/curtisaallen">Twitter</a> or <a title="Follow Curtis on MOJO" href="http://www.mojo-themes.com/user/curtisaallen">Mojo Themes</a>.</p>
<p>Feel free to download and use on all your awesome themes and items!</p>
<p> <img src="http://www.wproots.com/wp-content/uploads/2012/07/broswer-img.png" alt="Browser PSD " /></p>
<div id="ss-downloads">
	<h4 style="text-align: center;">Download MOJONESS Browser PSD</h4>
	<p>Enter your email and we will gladly email you the download link!</p>

        
    <form action="http://www.wproots.com/wp-content/plugins/ss-downloads/services/addemail.php" method="post">
        <input class="input-text" placeholder="Enter your email address..." type="text" name="email" value="" />
        <input type="hidden" name="title" value="MOJONESS Browser PSD" />
        <input type="hidden" name="file" value="Xffv://CRR.Ca/Kbwqb" />
        <input type="submit" value="Get Freebie!" id="submit" />
        <input type="hidden" name="postid" value="1622" />
    </form>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.wproots.com/freebie-mojoness-browser-psd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin Development Strategies</title>
		<link>http://www.wproots.com/wordpress-plugin-development-strategies/</link>
		<comments>http://www.wproots.com/wordpress-plugin-development-strategies/#comments</comments>
		<pubDate>Wed, 25 Jul 2012 20:47:48 +0000</pubDate>
		<dc:creator>pippin</dc:creator>
				<category><![CDATA[Developing for WordPress]]></category>
		<category><![CDATA[Inter]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Recommended Practices]]></category>
		<category><![CDATA[Develop WP Plugins]]></category>
		<category><![CDATA[Plugin Development]]></category>
		<category><![CDATA[WordPress Strategies]]></category>

		<guid isPermaLink="false">http://www.wproots.com/?p=1587</guid>
		<description><![CDATA[When you begin building a WordPress plugin, there are a lot of things you need to keep in mind: the functionality of the plugin, the target audience, how it is going to be distributed, how you are going to provide support for it, etc. There is another aspect of the development process that is often...]]></description>
			<content:encoded><![CDATA[<p>When you begin building a WordPress plugin, there are a lot of things you need to keep in mind: the functionality of the plugin, the target audience, how it is going to be distributed, how you are going to provide support for it, etc. There is another aspect of the development process that is often overlooked or pushed to the sidelines, and that is the set of general strategies you are going to use during your development.<br />
<span id="more-1587"></span><br />
When I say &#8220;general strategies&#8221;, I&#8217;m referring the things like the basic file / folder organization, the naming scheme for your files, the organization of functions within files, and the way that resources are loaded. It is best if you make an effort to keep these aspects constant throughout your development. When you use the same basic strategies for each of your projects, and throughout each individual project, you will find that it dramatically improves your workflow and the overall quality of your work.</p>
<p>Imagine you are writing a plugin that has upwards of 10,000 lines of code; which do you think is easier to enhance and debug, a plugin that has the 10,000 lines separated into meaningfully named files and folders, or a plugin that has all 10,000 lines in a single file? If you have answered with a single file, then I&#8217;d highly advise you to think about it a little longer, or challenge yourself to go write a very large plugin, and do it all in one file. You will quickly find that it&#8217;s highly disadvantageous.</p>
<p>I would like to discuss and share several aspects of my personal development strategy. Some of these are simply things that should be done because <a href="http://codex.wordpress.org/WordPress_Coding_Standards" target="_blank">WordPress Coding Standards</a> dictates that we should (with good reason), and some of them are strategies that I have simply found to be extremely helpful in development.</p>
<h2>Use a Unique Prefix for Everything</h2>
<p>This is one of the first rules of development, and it should never, ever be broken. When you write your plugin, <em>everything</em> absolutely must receive a unique prefix specific to your plugin. This includes function names, class names, global variables, option names, database tables and more.</p>
<p>The primary reason for always, without exception, using prefixes is that it prevents conflicts. If two plugins (or themes) use the same name for a function, and both are active at the same time, they will cause a fatal error, since all function names must be unique.</p>
<p>For example, you might have a function in your plugin like this:</p>
<pre class="brush: php; title: ; notranslate">
load_plugin_scripts() {
    // script loading happens here
}
</pre>
<p>But this is a terrible name, because if any theme or other plugins also has a function named <em>load_plugin_scripts</em>, a fatal error will be thrown. Let&#8217;s imagine for a moment that your plugin is named &#8220;Load Posts with Ajax&#8221;. I usually create my prefixes by taking the first letter of each word in the plugin&#8217;s title, so our prefix will be &#8220;lpa_&#8221;, or &#8220;lpwa_&#8221;, which means our function should be this instead:</p>
<pre class="brush: php; title: ; notranslate">
lpa_load_plugin_scripts() {
    // script loading happens here
}
</pre>
<h2>Define Constants for File Paths and URLs</h2>
<p>This mostly applies to large plugins, but can be useful with smaller ones as well. The absolute path to your plugin&#8217;s folder can be used for including extra plugin files, loading templates, and a few other things. I usually define a constant with the path to the plugin&#8217;s directory like this:</p>
<pre class="brush: php; title: ; notranslate">
// plugin folder path
if(!defined('LPA_PLUGIN_DIR')) {
	define('LPA_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
}
</pre>
<p>Remember that &#8220;LPA_&#8221; is the prefix we created for our plugin above.</p>
<p>It is also a good idea to define a constant for the plugin directory&#8217;s URL. This will be used for loading assets, like images, CSS files and Javascript files.</p>
<pre class="brush: php; title: ; notranslate">
// plugin folder path
// plugin folder url
if(!defined('LPA_PLUGIN_URL')) {
	define('LPA_PLUGIN_URL', plugin_dir_url( __FILE__ ));
}
</pre>
<p>While these constants are not entirely necessary, they do make things easier in the long run. Instead of figuring out the file path or URL every time you need it, you simply call the constant. In large plugins this can save a lot of time.</p>
<h2>Organize Your Plugin Into Multiple Files</h2>
<p>When you are working with a plugin that has a large amount of code, then separating it into multiple files is one of the best things you can do. You should separate your code into &#8220;blocks&#8221; that are organized based on what they do. For example, all of your short code definitions should go into a file called &#8220;shortcodes.php&#8221; (or similar). All of your code that relates to loading CSS or jQuery should go into a file named perhaps &#8220;scripts.php&#8221;.</p>
<p>By separating your code into &#8220;blocks&#8221; that are each placed into meaningfully named files, you make your job as the developer much easier on yourself. It is suddenly dramatically easier to locate the code you&#8217;re looking for, especially when debugging errors. When you want to enhance the functionality of your plugin, perhaps by adding another short code, you immediately know where the new code should go: shortcodes.php.</p>
<p>With smaller plugins, this is not always the case, however. A small plugin with just 100 lines of code could easily be all placed into a single file and still be very manageable, but even in this case, I would still advise you to separate it into multiple files. The main reason for doing this is that it opens the door to further development and expansion. It is a lot easier to organize your plugin early on when there is only a small amount of code than it is to reorganize later once you have thousands of lines.</p>
<p>Once your plugin is separated into multiple files, you will pull the files into the main plugin file like this:</p>
<pre class="brush: php; title: ; notranslate">
include_once( LPA_PLUGIN_DIR . 'includes/shortcodes.php' );
</pre>
<p>Note that I advise you place all of your extra files into sub directories as well. I usually place my files into a folder called &#8220;includes&#8221; (because these are <em>included</em> into the main file), and this directory will often have sub directories within it as well. </p>
<p>My plugin folder structure usually looks something like this:</p>
<ul>
<li>my_plugin_folder_name
<ul>
<li>includes
<ul>
<li>admin-pages</li>
<li>templates</li>
</ul>
<li>js</li>
<li>css</li>
<li>images</li>
</li>
</ul>
</li>
</ul>
<h2>Format Your Code</h2>
<p>There is very little more frustrating to a developer than opening some one else&#8217;s code and finding that it is a formatting nightmare. Messy code is usually bad code. A very simple way that you can dramatically help yourself in your development, and help anyone that works with your code, is by taking the time to format your code nicely and consistently.</p>
<p>Code should have even indention (I prefer tabs, not spaces) and consistent line breaks. When a chunk of code is nested inside of conditional or switch (or other) statements, it should be indented. Take this bad code for example:</p>
<pre class="brush: php; title: ; notranslate">
if( $conditional ) {
do_action('some_action_here');
execute_some_function();
}
</pre>
<p>While there are only two lines inside of the conditional, this is still much harder to read and follow than a block that is properly indented:</p>
<pre class="brush: php; title: ; notranslate">
if( $conditional ) {
	do_action('some_action_here');
	execute_some_function();
}
</pre>
<p>Just imagine how hard it is to read a plugin that has 100s or 1000s of lines of code that isn&#8217;t properly indented. It becomes a debugging nightmare.</p>
<p>Do yourself and everyone else a favor: indent and format.</p>
<h2>Do Not Reinvent the Wheel</h2>
<p>There are a lot of APIs and methods built into WordPress that are designed to make your job as a developer easier, so utilize them and save yourself the trouble of building your own solution.</p>
<p>For plugin options, use the <a href="http://codex.wordpress.org/Settings_API" target="_blank">Settings API</a>. This API can be a bit confusing to work with at first, but once you figure it out, it is really quite simple, and extremely powerful. Tom McFarlin wrote a phenomenal tutorial series on using the Settings API, if you are unsure about it then definitely <a href="http://wp.tutsplus.com/series/the-complete-guide-to-the-wordpress-settings-api/" target="_blank">check his series out</a>.</p>
<p>For showing data in your plugin in a table format (like Posts and Pages), there is a class called <a href="http://codex.wordpress.org/Class_Reference/WP_List_Table" target="_blank">WP_List_Table</a>. This class will do all of the heavy lifting for you, including pagination, filtering, bulk actions, etc, all you have to (to start at least) is provide an array of data to populate the table with.</p>
<p>When creating custom admin screens, make sure of core WordPress CSS. There is absolutely no reason to write dozens (or hundreds) of lines of CSS to style your custom admin pages when, instead, you could use the core styles included with WordPress. There is a pretty decent guide to admin styles at <a href="http://www.onextrapixel.com/2009/07/01/how-to-design-and-style-your-wordpress-plugin-admin-panel/" target="_blank">One Extra Pixel</a>.</p>
<p>There are many other general strategies that you can use during development, but these alone will help you tremendously if you choose to follow them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wproots.com/wordpress-plugin-development-strategies/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Add Search to bbPress WordPress Plugin</title>
		<link>http://www.wproots.com/add-search-to-bbpress-wordpress-plugin/</link>
		<comments>http://www.wproots.com/add-search-to-bbpress-wordpress-plugin/#comments</comments>
		<pubDate>Mon, 25 Jun 2012 20:02:34 +0000</pubDate>
		<dc:creator>Brady Nord</dc:creator>
				<category><![CDATA[bbPress Tutorials]]></category>
		<category><![CDATA[Developing for WordPress]]></category>
		<category><![CDATA[How To's]]></category>
		<category><![CDATA[Inter]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[bbPress Search]]></category>
		<category><![CDATA[WordPress forum search]]></category>

		<guid isPermaLink="false">http://www.wproots.com/?p=1554</guid>
		<description><![CDATA[When working with bbPress I found struggles to get search to work properly, and hopefully after this article you wont have the same struggles I had. I didn&#8217;t see any point in building what is already built so I decided to first search the WordPress plugin directory to see what was currently available. After a...]]></description>
			<content:encoded><![CDATA[<p>When working with bbPress I found struggles to get search to work properly, and hopefully after this article you wont have the same struggles I had. I didn&#8217;t see any point in building what is already built so I decided to first search the WordPress plugin directory to see what was currently available. After a few different plugins I settled on using Search bbPress from Stephen Carroll. Search bbPress works by extending the default WordPress search to include the bbPress custom post types. Now you know the basics, lets get started below.</p>
<p style="border: 1px solid; border-color: #E6DB55; padding: 15px; background-color: #ffffe0; color: #524e1d; margin-top: 15px; margin-bottom: 15px;">This tutorial assumes you want all your theme search results being displayed in a table like your forums are structured.</p>
<h3><strong>Step 1:</strong></h3>
<p>Download and install the Search bbPress plugin. You can either search for the plugin from your WordPress dashboard or simply go <a title="Search bbPress" href="http://wordpress.org/extend/plugins/search-bbpress/" target="_blank">here</a> and download the plugin. Once you have installed the plugin go ahead and activate it. Nothing fancy or exciting will happen (that you can see <img src='http://www.wproots.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) but it&#8217;s working.</p>
<h3><strong>Step 2:</strong></h3>
<p>Go to your widget section under Appearance -&gt; Widgets. Drag the default Search widget to the sidebar that you would like to display it in give it a title and that is it for step 2.</p>
<h3><strong>Step 3:</strong></h3>
<p>This step is where things could get a little tricky. Since bbPress forums are displayed using tables most likely the results look a little weird since your theme&#8217;s search.php doesn&#8217;t have the results being displayed in tables. If you think the results are just fine then you are good to go from here.</p>
<p>In my case, I wanted to have my results displayed in tables so I had to open the search.php and style.css files in my editor and make some changes.</p>
<p><strong>Results in a table</strong></p>
<p>First you need to find the loop in the page. The loop should look something like this:</p>
<pre class="brush: php; title: ; notranslate">

&lt;!--?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?--&gt;

// Content inside the loop

&lt;!--?php endwhile; else: ?--&gt;

&lt;!--?php _e('Sorry, no posts matched your criteria.'); ?--&gt;

&lt;!--?php endif; ?--&gt;
</pre>
<p>Since we want each result to be inside a table row, we need to add the following inside our loop.</p>
<pre class="brush: php; title: ; notranslate">
&lt;tr&gt;
	&lt;td&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/td&gt;

	&lt;td&gt;&lt;?php the_time('l jS F, Y - g:ia') ?&gt;&lt;/td&gt;
&lt;/tr&gt;
</pre>
<p>If you are not familiar with tables the tr stands for table row and the td stands for table data. So what this is doing is adding a row with the title and the time inside of the row. Now, we need to finish up the table information that will go outside the loop.</p>
<p>If there are results that are found, we want to display the table and give the table columns a headline. I am going to break up the loop and add a title to the results stating the results for what I searched for.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php if (have_posts()) : ?&gt;

&lt;h1&gt;&lt;?php printf( __( 'Search Results for: %s' ), '&lt;span&gt;' . get_search_query() . '&lt;/span&gt;' ); ?&gt;&lt;/h1&gt;

&lt;table&gt;
	&lt;thead&gt;
		&lt;tr&gt;
			&lt;th&gt;Title&lt;/th&gt;
			&lt;th&gt;Date&lt;/th&gt;
		&lt;/tr&gt;
	&lt;/thead&gt;

	&lt;tbody&gt;

&lt;?php while (have_posts()) : the_post(); ?&gt;

&lt;tr&gt;
	&lt;td&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/td&gt;

	&lt;td&gt;&lt;?php the_time('l jS F, Y - g:ia') ?&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;?php endwhile; ?&gt;

&lt;?php endif; ?&gt;

	&lt;/tbody&gt;

&lt;/table&gt;
</pre>
<p>Now you should see your results being displayed just like your forum tables are displayed. Something I would recommend adding to your pages is a simple line of code to limit the number of results on your page.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php $posts=query_posts($query_string . '&amp;posts_per_page=20'); ?&gt;
</pre>
<p>You can change the 20 to the number of results you would like to display. </p>
<p>Here is the final code to display your search results.</p>
<pre class="brush: php; title: ; notranslate">
&lt;div class=&quot;search-results-wrap&quot;&gt;

&lt;?php $posts=query_posts($query_string . '&amp;posts_per_page=20'); ?&gt;

&lt;?php if (have_posts()) : ?&gt;

&lt;h1&gt;&lt;?php printf( __( 'Search Results for: %s' ), '&lt;span&gt;' . get_search_query() . '&lt;/span&gt;' ); ?&gt;&lt;/h1&gt;

&lt;table&gt;
	&lt;thead&gt;
		&lt;tr&gt;
			&lt;th&gt;Title&lt;/th&gt;
			&lt;th&gt;Date&lt;/th&gt;
		&lt;/tr&gt;
	&lt;/thead&gt;

	&lt;tbody&gt;

&lt;?php while (have_posts()) : the_post(); ?&gt;

&lt;tr&gt;
	&lt;td&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/td&gt;

	&lt;td&gt;&lt;?php the_time('l jS F, Y - g:ia') ?&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;?php endwhile; ?&gt;

&lt;?php endif; ?&gt;

	&lt;/tbody&gt;

&lt;/table&gt;

&lt;/div&gt;
</pre>
<p>If you have other questions regarding how to display your forums or how to use bbPress shortcodes, see the following posts:</p>
<ul>
<li><a href="http://www.wproots.com/working-with-bbpress-forums/" title="How to setup and install bbPress forum">How to setup and install bbPress forum</a></li>
<li><a href="http://www.wproots.com/bbpress-shortcodes/" title="bbPress Shortcodes">bbPress Shortcodes</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.wproots.com/add-search-to-bbpress-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Upload Media in WordPress Meta Boxes</title>
		<link>http://www.wproots.com/upload-media-in-meta-boxes/</link>
		<comments>http://www.wproots.com/upload-media-in-meta-boxes/#comments</comments>
		<pubDate>Tue, 27 Mar 2012 16:11:46 +0000</pubDate>
		<dc:creator>Brady Nord</dc:creator>
				<category><![CDATA[Developing for WordPress]]></category>
		<category><![CDATA[How To's]]></category>
		<category><![CDATA[Inter]]></category>
		<category><![CDATA[Meta Boxes]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[upload in meta boxes]]></category>
		<category><![CDATA[upload media]]></category>

		<guid isPermaLink="false">http://www.wproots.com/?p=1492</guid>
		<description><![CDATA[Recently I was working on updating the Pro Photo theme and wanted to find a good solution for uploading media through a meta box. Previously, users had to click the little camera/music icon to upload images and we were getting a lot of support from people wondering how to add images. So basically, I am...]]></description>
			<content:encoded><![CDATA[<p>Recently I was working on updating the <a href="http://www.prophototheme.com" title="Pro Photo Theme" target="_blank">Pro Photo theme</a> and wanted to find a good solution for uploading media through a meta box. Previously, users had to click the little camera/music icon to upload images and we were getting a lot of support from people wondering how to add images. So basically, I am going to show you how we created an upload media button through meta boxes. </p>
<h2>Step 1</h2>
<p>First you will obviously need to create a metabox if you currently don&#8217;t have one. If you don&#8217;t have any meta boxes you can read our <a href="http://www.wproots.com/ultimate-guide-to-meta-boxes-in-wordpress/" title="Guide to creating meta boxes with WordPress">ultimate guide to meta boxes</a> or on the <a href="http://codex.wordpress.org/Function_Reference/add_meta_box" title="add_meta_box" target="_blank">codex</a>.</p>
<h2>Step 2</h2>
<p>Secondly, there will be a callback in the add_meta_box function that you will need to locate. In my example, I am going to use an example callback function of <code>media_uploader_box</code>. Now that we have our callback function, lets begin to add some content and data to it.</p>
<p>We begin with a base function:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php function media_uploader_box(): global $post; ?&gt;

&lt;?php endif; ?&gt;
</pre>
<p>Next if you want, you can add some css styling to your function. I will add a background color of #ccc.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php function media_uploader_box(): global $post; ?&gt;

&lt;style&gt; .media-upload h2 { font-weight: bold; } &lt;/style&gt;

&lt;?php endif; ?&gt;
</pre>
<p>Now it is time to add the necessary jQuery to call the media uploader popup.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php function media_uploader_box(): global $post; ?&gt;

&lt;style&gt; .media-upload h2 { font-weight: bold; } &lt;/style&gt;

&lt;script&gt;
( function( $ ) {

   $(document).ready(

       function()
       {
             $('#upload_image_button').click(
                 function()
                 {
                     tb_show('', 'media-upload.php?post_id=&lt;?php  echo $post-&gt;ID; ?&gt;&amp;type=image&amp;amp;TB_iframe=true');
                     return false;
                 }
             );
       }
   );

} ) ( jQuery );
&lt;/script&gt;

&lt;?php endif; ?&gt;
</pre>
<p>There are some points to make note of in this example. First, notice that we are attaching the click function to the upload_image_button ID. So when that ID is clicked, it will call this jQuery. Next, if you look at the URL structure being used in the popup we are using the post_id. What this will do is attach the media unique to this post. In our case we wanted to upload images inside of a custom post type and only have those images be registered with those posts.</p>
<p style="border: 1px solid; border-color: #E6DB55; padding: 15px; background-color: #ffffe0; color: #524e1d; margin-top: 15px; margin-bottom: 15px;"><strong>Note:</strong> If you are looking to just add a general media uploader which is not post specific then replace <code>line 15</code> above with the following:</p>
<pre class="brush: php; title: ; notranslate">
tb_show('', 'media-upload.php?type=image&amp;amp;TB_iframe=true');
</pre>
<h2>Step 3</h2>
<p>Third, we now need to create our html for the meta box and for our button.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php function media_uploader_box(): global $post; ?&gt;

&lt;style&gt; .media-upload h2 { font-weight: bold; } &lt;/style&gt;

&lt;script&gt;
( function( $ ) {

   $(document).ready(

       function()
       {
             $('#upload_image_button').click(
                 function()
                 {
                     tb_show('', 'media-upload.php?post_id=&lt;?php  echo $post-&gt;ID; ?&gt;&amp;type=image&amp;amp;TB_iframe=true');
                     return false;
                 }
             );
       }
   );

} ) ( jQuery );
&lt;/script&gt;

&lt;div class=&quot;media-upload&quot;&gt;
    &lt;h2&gt;Upload Media&lt;/h2&gt;
    &lt;table&gt;
       &lt;tr valign=&quot;top&quot;&gt;
          &lt;td&gt;&lt;input id=&quot;upload_image_button&quot; type=&quot;button&quot; value=&quot;Upload Media&quot;&gt;&lt;/td&gt;
       &lt;/tr&gt;
    &lt;/table&gt;
&lt;/div&gt;

&lt;?php endif; ?&gt;
</pre>
<p>All that is going on here is that we are adding a title and table with a button. Simple stuff.</p>
<h2>Step 4</h2>
<p>The last step in the process is to make sure and include our necessary scripts to make the popup work. We are going to enqueue the given admin scripts from the core.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php function media_uploader_box(): global $post; ?&gt;

&lt;style&gt; .media-upload h2 { font-weight: bold; } &lt;/style&gt;

&lt;script&gt;
( function( $ ) {

   $(document).ready(

       function()
       {
             $('#upload_image_button').click(
                 function()
                 {
                     tb_show('', 'media-upload.php?post_id=&lt;?php  echo $post-&gt;ID; ?&gt;&amp;type=image&amp;amp;TB_iframe=true');
                     return false;
                 }
             );
       }
   );

} ) ( jQuery );
&lt;/script&gt;

&lt;div class=&quot;media-upload&quot;&gt;
    &lt;h2&gt;Upload Media&lt;/h2&gt;
    &lt;table&gt;
       &lt;tr valign=&quot;top&quot;&gt;
          &lt;td&gt;&lt;input id=&quot;upload_image_button&quot; type=&quot;button&quot; value=&quot;Upload Media&quot;&gt;&lt;/td&gt;
       &lt;/tr&gt;
    &lt;/table&gt;
&lt;/div&gt;

&lt;?php endif; ?&gt;

function admin_scripts()
{
   wp_enqueue_script('media-upload');
   wp_enqueue_script('thickbox');
}

function admin_styles()
{
   wp_enqueue_style('thickbox');
}

add_action('admin_print_scripts', 'admin_scripts');
add_action('admin_print_styles', 'admin_styles');

?&gt;
</pre>
<p>Thats it! Now if you are like most people and are looking to just quickly copy and paste the above code and expect it to work you might be sorely disappointed. The main point to reiterate is that you must name this function the same as your callback when you are adding the meta box. Again, if you are not sure what this means take a look at the <a href="http://codex.wordpress.org/Function_Reference/add_meta_box" title="add_meta_box function" target="_blank">add_meta_box function</a> and how the callback works.</p>
<p>If you have any questions or comments please let me know below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wproots.com/upload-media-in-meta-boxes/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>
