Warning: Illegal string offset 'encoded' in /home/better/public_html/merger/full.php on line 212

Warning: Illegal string offset 'encoded' in /home/better/public_html/merger/full.php on line 212

Warning: Illegal string offset 'encoded' in /home/better/public_html/merger/full.php on line 212

Warning: Illegal string offset 'encoded' in /home/better/public_html/merger/full.php on line 212
Error: Cannot fetch feed url - http://krogsgard.com/feed
Warning: Cannot modify header information - headers already sent by (output started at /home/better/public_html/merger/full.php:212) in /home/better/public_html/merger/feedcreator.class.php on line 645

Warning: Cannot modify header information - headers already sent by (output started at /home/better/public_html/merger/full.php:212) in /home/better/public_html/merger/feedcreator.class.php on line 646
A Better Planet - WordPress News News and updates from the world of WordPress http://abetterplanetwp.com 2016-07-27T06:11:08+01:00 text/html 2016-07-27T19:15:00+01:00 http://abetterplanetwp.com A Better Planet 34SP.com Review – Fast, Secure and Managed WordPress Hosting http://feedproxy.google.com/~r/Wplift/~3/9WRJk5UtnPU/34sp-hosting-review text/html 2016-07-27T19:00:39+01:00 http://abetterplanetwp.com A Better Planet Smart Ways to Monetize Your WordPress Blog: A Guide - BobWP – Your Trusted WordPress Source http://feeds.feedblitz.com/~/169761326/0/bobwp-wordpress~Smart-Ways-to-Monetize-Your-WordPress-Blog-A-Guide-BobWP-Your-Trusted-WordPress-Source/ <p>In this guide we walk you through several different approaches on making money on your blog. We explore advertising, affiliate marketing, content lockers, products, services, donations, online courses and membership sites.</p> <p>The post <a rel="nofollow" href="http://feeds.feedblitz.com/~/t/0/0/bobwp-wordpress/~https://bobwp.com/smart-way-monetizing-wordpress-blog/">Smart Ways to Monetize Your WordPress Blog: A Guide</a> appeared first on <a rel="nofollow" href="http://feeds.feedblitz.com/~/t/0/0/bobwp-wordpress/~https://bobwp.com">BobWP - Your Trusted WordPress Source</a>....</p><p style="clear:left"><a href="http://feeds.feedblitz.com/~/169761326/0/bobwp-wordpress"><b>Read the whole entry...</b></a>&nbsp;<!-- _!fbztxtlnk!_ http://feeds.feedblitz.com/~/169761326/0/bobwp-wordpress --><b>&raquo;</b><Img align="left" border="0" height="1" width="1" alt="" style="border:0;float:left;margin:0;padding:0" hspace="0" src="http://feeds.feedblitz.com/~/i/169761326/0/bobwp-wordpress"> </p><div style="clear:both;padding-top:0.2em;"><a title="Add to FaceBook" href="http://feeds.feedblitz.com/_/2/169761326/BobWP-WordPress"><img height="20" src="http://assets.feedblitz.com/i/fbshare20.png" style="border:0;margin:0;padding:0;"></a>&#160;<a title="Like on Facebook" href="http://feeds.feedblitz.com/_/28/169761326/BobWP-WordPress"><img height="20" src="http://assets.feedblitz.com/i/fblike20.png" style="border:0;margin:0;padding:0;"></a>&#160;<a title="Add to Google Bookmarks" href="http://feeds.feedblitz.com/_/13/169761326/BobWP-WordPress"><img height="20" src="http://assets.feedblitz.com/i/googlebookmark20.png" style="border:0;margin:0;padding:0;"></a>&#160;<a title="Share on Google+" href="http://feeds.feedblitz.com/_/30/169761326/BobWP-WordPress"><img height="20" src="http://assets.feedblitz.com/i/googleplus20.png" style="border:0;margin:0;padding:0;"></a>&#160;<a title="Add to LinkedIn" href="http://feeds.feedblitz.com/_/16/169761326/BobWP-WordPress"><img height="20" src="http://assets.feedblitz.com/i/linkedin20.png" style="border:0;margin:0;padding:0;"></a>&#160;<a title="Pin it!" href="http://feeds.feedblitz.com/_/29/169761326/BobWP-WordPress,"><img height="20" src="http://assets.feedblitz.com/i/pinterest20.png" style="border:0;margin:0;padding:0;"></a>&#160;<a title="Tweet This" href="http://feeds.feedblitz.com/_/24/169761326/BobWP-WordPress"><img height="20" src="http://assets.feedblitz.com/i/twitter20.png" style="border:0;margin:0;padding:0;"></a>&#160;<a title="Subscribe by email" href="http://feeds.feedblitz.com/_/19/169761326/BobWP-WordPress"><img height="20" src="http://assets.feedblitz.com/i/email20.png" style="border:0;margin:0;padding:0;"></a>&#160;<a title="Subscribe by RSS" href="http://feeds.feedblitz.com/_/20/169761326/BobWP-WordPress"><img height="20" src="http://assets.feedblitz.com/i/rss20.png" style="border:0;margin:0;padding:0;"></a>&#160;<a rel="NOFOLLOW" title="View Comments" href="https://bobwp.com/smart-way-monetizing-wordpress-blog/#respond"><img height="20" style="border:0;margin:0;padding:0;" src="http://assets.feedblitz.com/i/comments20.png"></a>&#160;<a title="Follow Comments via RSS" href="https://bobwp.com/smart-way-monetizing-wordpress-blog/feed/"><img height="20" style="border:0;margin:0;padding:0;" src="http://assets.feedblitz.com/i/commentsrss20.png"></a>&#160;</div> text/html 2016-07-27T19:00:24+01:00 http://abetterplanetwp.com A Better Planet 21 Best WordPress Starter Themes for Developers in 2016 http://www.wpbeginner.com/wp-themes/21-best-wordpress-starter-themes-for-developers/ <p>Are you just getting started with WordPress theme development? WordPress starter themes help you get started with a solid foundation. In this article, we have hand-picked the best WordPress starter themes for theme developers. </p> <p><img title="Best WordPress starter theme" src="http://cdn.wpbeginner.com/wp-content/uploads/2016/07/beststarterthemewp.jpg" alt="Best WordPress starter theme" width="520" height="340" class="alignnone size-full wp-image-35978" srcset="http://cdn4.wpbeginner.com/wp-content/uploads/2016/07/beststarterthemewp.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/beststarterthemewp-300x196.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></p> <h4>What is a WordPress Starter Theme</h4> <p>A WordPress Starter theme is a blank theme with minimum design, and a basic or absolutely no layout. These themes usually come with the most commonly used templates in a WordPress theme. </p> <p>They have code to display posts, archive pages, single posts, comments, but with minimum or no styling at all. This allows theme developers to quickly start adding their own styles to build a totally new theme. </p> <p>Starter themes are different than a <a href="http://www.wpbeginner.com/glossary/parent-theme/" title="What is a Parent Theme in WordPress?">parent theme</a> or a <a href="http://www.wpbeginner.com/beginners-guide/what-is-a-theme-framework/" title="What is a WordPress Theme Framework? Pros, Cons, and More">theme framework</a>. Parent themes are fully styled WordPress themes designed to be installed and used on live websites. Theme frameworks provide a lot of hooks and filters for usage in <a href="http://www.wpbeginner.com/beginners-guide/wordpress-child-theme-pros-cons/" title="What is a WordPress Child Theme? Pros, Cons, and More">child theme development</a>. </p> <p>Starter themes do not come with styling, you are not supposed to use them as it is, and they are not frameworks with custom hooks, filters, and template tags. </p> <p>Instead, you use a starter theme to build a parent theme.</p> <p>Having said that, let&#8217;s take a look at some of the best starter themes for WordPress. </p> <h4><a href="http://underscores.me/" target="_blank" title="Underscores" rel="nofollow">1. Underscores</a></h4> <p><a href="http://underscores.me/" target="_blank" title="Underscores" rel="nofollow"><img title="Underscores" src="http://cdn3.wpbeginner.com/wp-content/uploads/2016/01/underscores.jpg" alt="Underscores" width="520" height="350" class="alignnone size-full wp-image-35952" srcset="http://cdn4.wpbeginner.com/wp-content/uploads/2016/01/underscores.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/01/underscores-300x202.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>Underscores is probably the most popular of all WordPress starter themes. Maintained by Automattic (the company behind WordPress.com blog hosting service), Underscores is a minimalist starter theme written in HTML5 and CSS. The clean code is meant to get out of your way and help you quickly build a standard compliant WordPress theme. </p> <h4><a href="http://components.underscores.me/" target="_blank" title="Components" rel="nofollow">2. Components</a></h4> <p><a href="http://components.underscores.me/" target="_blank" title="Components" rel="nofollow"><img title="Components" src="http://cdn4.wpbeginner.com/wp-content/uploads/2016/07/components.jpg" alt="Components" width="520" height="325" class="alignnone size-full wp-image-35954" srcset="http://cdn3.wpbeginner.com/wp-content/uploads/2016/07/components.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/components-300x188.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>From the folks behind Underscores comes Components. It is basically 6 starter themes for different kind of websites. Currently there is a base, blog, blog modern, <a href="http://www.wpbeginner.com/wp-themes/15-great-looking-free-portfolio-themes-for-wordpress/" title="15 Great Looking Free Portfolio Themes for WordPress">portfolio</a>, <a href="http://www.wpbeginner.com/showcase/21-best-free-wordpress-business-themes/" title="21 Best Free WordPress Business Themes">business</a>, and <a href="http://www.wpbeginner.com/showcase/best-wordpress-magazine-themes/" title="14 Best WordPress Magazine Themes of 2016">magazine</a> starter theme available for download. </p> <h4><a href="http://themble.com/bones/" target="_blank" title="Bones" rel="nofollow">3. Bones</a></h4> <p><a href="http://themble.com/bones/" target="_blank" title="Bones" rel="nofollow"><img title="Bones" src="http://cdn.wpbeginner.com/wp-content/uploads/2016/07/bones.jpg" alt="Bones" width="520" height="325" class="alignnone size-full wp-image-35955" srcset="http://cdn3.wpbeginner.com/wp-content/uploads/2016/07/bones.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/bones-300x188.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>Bones is a WordPress starter theme developed with a focus on mobile-first approach. It uses <a href="http://www.wpbeginner.com/wp-tutorials/introduction-to-sass-for-new-wordpress-theme-designers/" title="Introduction to Sass for New WordPress Theme Designers">Sass</a> and comes equipped with ready to use code for <a href="http://www.wpbeginner.com/wp-tutorials/how-to-create-custom-post-types-in-wordpress/" title="How to Create Custom Post Types in WordPress">custom post types</a> and custom dashboard functions. </p> <h4><a href="https://roots.io/sage/" target="_blank" title="Sage" rel="nofollow">4. Sage</a></h4> <p><a href="https://roots.io/sage/" target="_blank" title="Sage" rel="nofollow"><img title="Sage" src="http://cdn3.wpbeginner.com/wp-content/uploads/2016/07/sage.jpg" alt="Sage" width="520" height="325" class="alignnone size-full wp-image-35956" srcset="http://cdn.wpbeginner.com/wp-content/uploads/2016/07/sage.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/sage-300x188.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>Sage is a modern WordPress starter theme based on Gulp, Bootstrap, and Bower. It uses a Theme Wrapper which helps you avoid repeating the same code in every template. Sage is actively maintained and has a strong following among WordPress front-end developers. </p> <h4><a href="https://foundationpress.olefredrik.com/" target="_blank" title="FoundationPress" rel="nofollow">5. FoundationPress</a></h4> <p><a href="https://foundationpress.olefredrik.com/" target="_blank" title="FoundationPress" rel="nofollow"><img title="FoundationPress" src="http://cdn4.wpbeginner.com/wp-content/uploads/2016/07/foundationpress.jpg" alt="FoundationPress" width="520" height="325" class="alignnone size-full wp-image-35957" srcset="http://cdn2.wpbeginner.com/wp-content/uploads/2016/07/foundationpress.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/foundationpress-300x188.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>Based on Foundation 6 framework, FoundationPress is a modern WordPress starter theme. It comes with clean semantic code and powerful customization features that make it easier for you to rapidly build WordPress themes. </p> <h4><a href="https://wordpress.org/themes/understrap/" target="_blank" title="UnderStrap" rel="nofollow">6. UnderStrap</a></h4> <p><a href="https://wordpress.org/themes/understrap/" target="_blank" title="UnderStrap" rel="nofollow"><img title="Understrap" src="http://cdn2.wpbeginner.com/wp-content/uploads/2016/07/understrap.jpg" alt="Understrap" width="520" height="325" class="alignnone size-full wp-image-35958" srcset="http://cdn3.wpbeginner.com/wp-content/uploads/2016/07/understrap.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/understrap-300x188.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>UnderStrap is a WordPress starter theme based on Underscores and Bootstrap 4. It comes with a mobile first, responsive grid framework, and its super easy to customize. </p> <h4><a href="https://wordpress.org/themes/bootstrap-four/" target="_blank" title="Bootstrap Four" rel="nofollow">7. Bootstrap Four</a></h4> <p><a href="https://wordpress.org/themes/bootstrap-four/" target="_blank" title="Bootstrap Four" rel="nofollow"><img title="Bootstrap Four" src="http://cdn.wpbeginner.com/wp-content/uploads/2016/07/bootstrap-four.jpg" alt="Bootstrap Four" width="520" height="325" class="alignnone size-full wp-image-35959" srcset="http://cdn4.wpbeginner.com/wp-content/uploads/2016/07/bootstrap-four.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/bootstrap-four-300x188.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>As the name suggests, Bootstrap Four is a WordPress starter theme based on Bootstrap 4 framework. It provides a clean code base for theme developer to do whatever they want. </p> <h4><a href="https://wordpress.org/themes/wp-rootstrap/" target="_blank" title="WP RootStrap" rel="nofollow">8. WP RootStrap</a></h4> <p><a href="https://wordpress.org/themes/wp-rootstrap/" target="_blank" title="WP RootStrap" rel="nofollow"><img title="WP Rootstrap" src="http://cdn2.wpbeginner.com/wp-content/uploads/2016/07/rootstrap.jpg" alt="WP Rootstrap" width="520" height="350" class="alignnone size-full wp-image-35961" srcset="http://cdn4.wpbeginner.com/wp-content/uploads/2016/07/rootstrap.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/rootstrap-300x202.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>WP Rootstrap is a Boostrap 3 based WordPress starter theme for developers. It uses Options Framework for theme options. </p> <h4><a href="https://wordpress.org/themes/generic/" target="_blank" title="Generic" rel="nofollow">9. Generic</a></h4> <p><a href="https://wordpress.org/themes/generic/" target="_blank" title="Generic" rel="nofollow"><img title="Generic" src="http://cdn2.wpbeginner.com/wp-content/uploads/2016/07/generic.jpg" alt="Generic" width="520" height="325" class="alignnone size-full wp-image-35962" srcset="http://cdn4.wpbeginner.com/wp-content/uploads/2016/07/generic.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/generic-300x188.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>Generic is a simple WordPress starter theme. Generic is plain and just as minimal as you would like your starter theme to be. </p> <h4><a href="https://wordpress.org/themes/blankslate/" target="_blank" title="BlankSlate" rel="nofollow">10. BlankSlate</a></h4> <p><a href="https://wordpress.org/themes/blankslate/" target="_blank" title="BlankSlate" rel="nofollow"><img title="Blankslate" src="http://cdn4.wpbeginner.com/wp-content/uploads/2016/07/blankslate.jpg" alt="Blankslate" width="520" height="328" class="alignnone size-full wp-image-35963" srcset="http://cdn.wpbeginner.com/wp-content/uploads/2016/07/blankslate.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/blankslate-300x189.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>Blankslate is a simple and extremely flexible WordPress starter theme. It is designed with developers in mind. It is simple yet comes with powerful foundation for your themes to rely on. </p> <h4><a href="https://wordpress.org/themes/cyberchimps/" target="_blank" title="CyberChimps" rel="nofollow">11. CyberChimps</a></h4> <p><a href="https://wordpress.org/themes/cyberchimps/" target="_blank" title="CyberChimps" rel="nofollow"><img title="Cyberchimps" src="http://cdn4.wpbeginner.com/wp-content/uploads/2016/07/cyberchimps.jpg" alt="Cyberchimps" width="520" height="328" class="alignnone size-full wp-image-35964" srcset="http://cdn2.wpbeginner.com/wp-content/uploads/2016/07/cyberchimps.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/cyberchimps-300x189.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>CyberChimps is a fully responsive WordPress starter theme built with Bootstrap. It comes with a touch-friendly drag and drop options panel which allows users to customize their site using touch devices. </p> <h4><a href="https://wordpress.org/themes/klasik-framework/" target="_blank" title="Klasik Framework" rel="nofollow">12. Klasik Framework</a></h4> <p><a href="https://wordpress.org/themes/klasik-framework/" target="_blank" title="Klasik Framework" rel="nofollow"><img title="Klasik Framework" src="http://cdn.wpbeginner.com/wp-content/uploads/2016/07/klasik.jpg" alt="Klasik Framework" width="520" height="325" class="alignnone size-full wp-image-35965" srcset="http://cdn3.wpbeginner.com/wp-content/uploads/2016/07/klasik.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/klasik-300x188.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>Built with quicker theme development in mind, Klasik Framework is a simple starter theme for WordPress. Theme features 9 widget area, 8 custom widget and simple Theme Option for full CMS control</p> <h4><a href="https://wordpress.org/themes/start/" target="_blank" title="Start" rel="nofollow">13. Start</a></h4> <p><a href="https://wordpress.org/themes/start/" target="_blank" title="Start" rel="nofollow"><img title="Start" src="http://cdn.wpbeginner.com/wp-content/uploads/2016/07/starttheme.jpg" alt="Start" width="520" height="328" class="alignnone size-full wp-image-35966" srcset="http://cdn4.wpbeginner.com/wp-content/uploads/2016/07/starttheme.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/starttheme-300x189.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>Start is based on Underscores starter theme and Bootstrap framework. It inherits all the code of Underscores and adds Bootstrap magic for rapid front-end development. </p> <h4><a href="https://wordpress.org/themes/a11yall/" target="_blank" title="A11Y'All" rel="nofollow">14. A11Y&#8217;All</a></h4> <p><a href="https://wordpress.org/themes/a11yall/" target="_blank" title="A11Y'All" rel="nofollow"><img title="A11Y&#039;all" src="http://cdn3.wpbeginner.com/wp-content/uploads/2016/07/a11yall.jpg" alt="A11Y&#039;all" width="520" height="328" class="alignnone size-full wp-image-35968" srcset="http://cdn3.wpbeginner.com/wp-content/uploads/2016/07/a11yall.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/a11yall-300x189.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>If accessibility is a main concern for you, then you will love A11Y&#8217;All. It is a WordPress starter theme designed from scratch with accessibility in mind. It includes page templates and customizable menus, header, widgets and background.</p> <h4><a href="https://github.com/thewirelessguy/cornerstone" target="_blank" title="Cornerstone" rel="nofollow">15. Cornerstone</a></h4> <p><a href="https://github.com/thewirelessguy/cornerstone" target="_blank" title="Cornerstone" rel="nofollow"><img title="Cornerstone" src="http://cdn2.wpbeginner.com/wp-content/uploads/2016/07/cornerstone.jpg" alt="Cornerstone" width="520" height="325" class="alignnone size-full wp-image-35969" srcset="http://cdn2.wpbeginner.com/wp-content/uploads/2016/07/cornerstone.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/cornerstone-300x188.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>Cornerstone is a modern starter theme for WordPress developers. It is based on the popular Foundation framework. It comes ready with custom header, sidebar, widgets, and navigation menu locations pre-defined. </p> <h4><a href="https://github.com/grayghostvisuals/WP-Flex" target="_blank" title="WP-Flex" rel="nofollow">16. WP-Flex</a></h4> <p><a href="https://github.com/grayghostvisuals/WP-Flex" target="_blank" title="WP-Flex" rel="nofollow"><img title="WP-Flex" src="http://cdn.wpbeginner.com/wp-content/uploads/2016/07/wpflex.jpg" alt="WP-Flex" width="520" height="325" class="alignnone size-full wp-image-35970" srcset="http://cdn4.wpbeginner.com/wp-content/uploads/2016/07/wpflex.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/wpflex-300x188.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>WP-Flex is a blank WordPress theme or starter theme. It adheres to WordPress coding best practices and guidelines provided by WordPress theme review team. This basic theme can be a good starting point for any custom WordPress design. </p> <h4><a href="http://jointswp.com/" target="_blank" title="JointsWP" rel="nofollow">17. JointsWP</a></h4> <p><a href="http://jointswp.com/" target="_blank" title="JointsWP" rel="nofollow"><img title="JointsWP" src="http://cdn2.wpbeginner.com/wp-content/uploads/2016/07/jointswp.jpg" alt="JointsWP" width="520" height="325" class="alignnone size-full wp-image-35971" srcset="http://cdn2.wpbeginner.com/wp-content/uploads/2016/07/jointswp.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/jointswp-300x188.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>JointsWP is a rock solid WordPress starter theme. It is based on the Foundation 6 framework and comes in CSS or Sass flavors. </p> <h4><a href="https://github.com/Themekraft/_tk" target="_blank" title="_tk" rel="nofollow">18. _tk</a></h4> <p><a href="https://github.com/Themekraft/_tk" target="_blank" title="_tk" rel="nofollow"><img title="_tk" src="http://cdn3.wpbeginner.com/wp-content/uploads/2016/07/tk.jpg" alt="_tk" width="520" height="325" class="alignnone size-full wp-image-35973" srcset="http://cdn4.wpbeginner.com/wp-content/uploads/2016/07/tk.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/tk-300x188.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>Themekraft&#8217;s _tK is modern responsive WordPress starter theme. It is based on Twitter&#8217;s Bootstrap framework and the Underscores starter theme. </p> <h4><a href="https://github.com/maddisondesigns/Quark" target="_blank" title="Quark" rel="nofollow">19. Quark</a></h4> <p><a href="https://github.com/maddisondesigns/Quark" target="_blank" title="Quark" rel="nofollow"><img title="Quark" src="http://cdn3.wpbeginner.com/wp-content/uploads/2016/07/quark.jpg" alt="Quark" width="520" height="325" class="alignnone size-full wp-image-35974" srcset="http://cdn.wpbeginner.com/wp-content/uploads/2016/07/quark.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/quark-300x188.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>Quark is an easy to customize WordPress starter theme. It is based on Underscores and Twenty Twelve WordPress theme. It uses Normalize to make sure that browsers render all elements more consistently and Mordernizr for detecting HTML5 and CSS3 browser capabilities.</p> <h4><a href="https://github.com/chrisblakley/Nebula" target="_blank" title="Nebula" rel="nofollow">20. Nebula</a></h4> <p><a href="https://github.com/chrisblakley/Nebula" target="_blank" title="Nebula" rel="nofollow"><img title="Nebula" src="http://cdn.wpbeginner.com/wp-content/uploads/2016/07/nebula.jpg" alt="Nebula" width="520" height="325" class="alignnone size-full wp-image-35975" srcset="http://cdn2.wpbeginner.com/wp-content/uploads/2016/07/nebula.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/nebula-300x188.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>Nebula is an advanced WordPress starter theme that is more like framework but not completely a framework. It is a starter theme with lots of custom functionality like recommendation engine for 404 and no-search-result pages, and Autocomplete Search, etc. </p> <h4><a href="http://html5blank.com/" target="_blank" title="HTML5Blank" rel="nofollow">21. HTML5Blank</a></h4> <p><a href="http://html5blank.com/" target="_blank" title="HTML5Blank" rel="nofollow"><img title="HTML5Blank" src="http://cdn3.wpbeginner.com/wp-content/uploads/2016/07/html5blank.jpg" alt="HTML5Blank" width="520" height="325" class="alignnone size-full wp-image-35976" srcset="http://cdn2.wpbeginner.com/wp-content/uploads/2016/07/html5blank.jpg 520w, http://www.wpbeginner.com/wp-content/uploads/2016/07/html5blank-300x188.jpg 300w" sizes="(max-width: 520px) 100vw, 520px" /></a></p> <p>HTML5Blank is a easy to use WordPress starter theme. It is based on clean HTML5 and CSS3 templates with ready to use code and template tags for you to utilize during your theme development. </p> <p>We hope this article helped you find the best WordPress starter theme for developers. You may also want to see our guide on how to <a href="http://www.wpbeginner.com/wp-themes/how-to-add-dummy-content-for-theme-development-in-wordpress/" title="How to Add Dummy Content for Theme Development in WordPress">add dummy content for theme development in WordPress</a>. </p> <p>If you liked this article, then please subscribe to our <a href="http://youtube.com/wpbeginner?sub_confirmation=1" title="WPBeginner on YouTube" target="_blank" rel="nofollow">YouTube Channel</a> for WordPress video tutorials. You can also find us on <a href="http://twitter.com/wpbeginner" title="WPBeginner on Twitter" target="_blank" rel="nofollow">Twitter</a> and <a href="https://www.facebook.com/wpbeginner" title="WPBeginner on Facebook" target="_blank" rel="nofollow">Facebook</a>.</p> <p>The post <a rel="nofollow" href="http://www.wpbeginner.com/wp-themes/21-best-wordpress-starter-themes-for-developers/">21 Best WordPress Starter Themes for Developers in 2016</a> appeared first on <a rel="nofollow" href="http://www.wpbeginner.com">WPBeginner</a>.</p> text/html 2016-07-27T18:00:03+01:00 http://abetterplanetwp.com A Better Planet 3 Ways That Can Help You Increase Your Income http://feedproxy.google.com/~r/WPMayor/~3/Y_shDn1zQlU/ text/html 2016-07-27T17:47:56+01:00 http://abetterplanetwp.com A Better Planet Dev Chat Summary: July 20, 2016 https://make.wordpress.org/core/2016/07/27/dev-chat-summary-july-20-2016/ <h3>WordPress 4.6 Beta 4 and current progress</h3> <p>Beta 4, the last beta before RC1, was released today. Please test and report all bugs you encounter on <a href="https://core.trac.wordpress.org">Trac</a>.<br /> There are still 9 open tickets that should be closed by RC1 next week. <a href="https://core.trac.wordpress.org/report/5">https://core.trac.wordpress.org/report/5</a></p> <h4>Dev notes, field guide, email to plugin authors, 4.6 OMGWTFBBQ Draft Post</h4> <ul> <li><a href='https://profiles.wordpress.org/jorbin' class='mention'>@jorbin</a> started outlining/drafting the field guide and will have a first draft in the next 24 hours for committers to review.</li> <li>The email to plugin authors will be sent in conjunction with the release of RC1.</li> <li>The 4.6 OMGWTFBBQ Draft Post is a post by the support team. You can find it here: <a href="https://make.wordpress.org/support/2016/07/4-6-omgwtfbbq-draft-post/">https://make.wordpress.org/support/2016/07/4-6-omgwtfbbq-draft-post/</a>. The support team especially appreciate suggestions for the “Not a Bug” section (these are items which are intentional changes, but may seem like a bug or glitch to users offhand, like Dashboard fonts being different).</li> </ul> <h3>About page</h3> <h4>Feature Pointers</h4> <p>There are no feature pointers planned for 4.6. If your feature is planning on using a feature pointers, please consider if you really need to.</p> <h4>Let&#8217;s find a tagline.</h4> <p>The <a href="https://docs.google.com/document/d/1StJLWz03vEwF5Wvwz1UaerTZ4VpuUyy0j4jFjy8x7Rs/edit">brainstorming</a> document can be found here. There are a few suggestions for a tagline already, but please add them to the doc. Please keep it serious.</p> <h3>Project updates</h3> <h4>register_meta()</h4> <p><a href='https://profiles.wordpress.org/jeremyfelt' class='mention'>@jeremyfelt</a> published an updated dev note for the recent change (<a href="https://make.wordpress.org/core/2016/07/20/additional-register_meta-changes-in-4-6/">https://make.wordpress.org/core/2016/07/20/additional-register_meta-changes-in-4-6/</a>). It was shipped with beta 4 and also announced in the release post.</p> <h4>Font Natively</h4> <p>There are currently some alignment issues related to line-height. These will continue to be worked on as needed. Please report any other issues you may run into.</p> <h3>Component announcements/updates</h3> <p>None.</p> <h3>Open discussion</h3> <p>None.</p> <p>&nbsp;</p> <p>You can read the full chat logs here: <a href="https://wordpress.slack.com/archives/core/p1469044867000364">https://wordpress.slack.com/archives/core/p1469044867000364</a></p> text/html 2016-07-27T09:27:32+01:00 http://abetterplanetwp.com A Better Planet Easily Hide WordPress’ Blogging Features With the Disable Blogging Plugin https://wptavern.com/easily-hide-wordpress-blogging-features-with-the-disable-blogging-plugin <p>WordPress strikes a good balance by offering users the ability to publish dynamic content via posts and static content via pages. However, if you&#8217;d like to use WordPress primarily as a static content management system without the features related to blogging, check out a new plugin developed by <a href="https://profiles.wordpress.org/factmaven/">Fact Maven Corp</a>. and <a href="https://profiles.wordpress.org/ethanosullivan/">Ethan Jinks O&#8217;Sullivan</a> called <a href="https://wordpress.org/plugins/disable-blogging/">Disable Blogging</a>.</p> <p>Disable Blogging hides a number of features including:</p> <ul> <li>Posts, Comments, and items related to blogging from the admin menus.</li> <li>Comments from pages.</li> <li>Blog related widgets.</li> <li>Pingbacks, Trackbacks, and XML-RPC header links.</li> <li>Biographical info and Admin Color schemes on the user profile page.</li> <li>Press This Bookmarklet.</li> <li>Posts via email.</li> <li>Howdy, help tabs, and query strings from static resources.</li> </ul> <p>To really get a sense for what it&#8217;s like to use WordPress without its blogging capabilities, I activated the plugin on a fresh install.</p> <figure id="attachment_58148" style="width: 1109px" class="wp-caption alignnone"><img class="alignnone size-full wp-image-58148" src="https://i1.wp.com/wptavern.com/wp-content/uploads/2016/07/DisableBloggingOnFreshInstall.png?resize=1025%2C579&#038;ssl=1" alt="DisableBloggingOnFreshInstall" srcset="https://i1.wp.com/wptavern.com/wp-content/uploads/2016/07/DisableBloggingOnFreshInstall.png?w=1109&amp;ssl=1 1109w, https://i1.wp.com/wptavern.com/wp-content/uploads/2016/07/DisableBloggingOnFreshInstall.png?resize=300%2C169&amp;ssl=1 300w, https://i1.wp.com/wptavern.com/wp-content/uploads/2016/07/DisableBloggingOnFreshInstall.png?resize=768%2C434&amp;ssl=1 768w, https://i1.wp.com/wptavern.com/wp-content/uploads/2016/07/DisableBloggingOnFreshInstall.png?resize=500%2C282&amp;ssl=1 500w, https://i1.wp.com/wptavern.com/wp-content/uploads/2016/07/DisableBloggingOnFreshInstall.png?resize=886%2C500&amp;ssl=1 886w" sizes="(max-width: 1025px) 100vw, 1025px" data-recalc-dims="1" /><figcaption class="wp-caption-text">Disable Blogging Enabled on a Fresh Install</figcaption></figure> <p>There are two things that immediately stand out during testing. The first is that logging in takes users to their profile page instead of the Dashboard. Second, the Dashboard and the link to it are gone.</p> <p>I found the removal of the Dashboard creates a jarring experience that&#8217;s different from what users might expect. It&#8217;s usefulness to display widgets with site specific information, even for sites based on pages, is a huge benefit and therefore, its removal should be reconsidered.</p> <p>The nice thing about Disable Blogging is that it doesn&#8217;t permanently remove features or data. Regaining access to WordPress&#8217; blogging capabilities is as simple as deactivating the plugin.</p> <p>Browsing, using, and navigating WordPress with the blogging features hidden is an interesting experience that I encourage you to try for yourself. I tested <a href="https://wordpress.org/plugins/disable-blogging/">Disable Blogging </a>on a fresh install of WordPress 4.5.3 and didn&#8217;t encounter any problems. The next time you or a client wants an easy way to disable WordPress&#8217; blogging capabilities, give this plugin a shot.</p> <div id="epoch-width-sniffer"></div> text/html 2016-07-27T08:02:19+01:00 http://abetterplanetwp.com A Better Planet Why it makes sense to hire small agencies http://chrislema.com/hire-small-agencies/ <h2>A word about Big Companies</h2> <p>I can still remember one of the first times I sold enterprise software to an enterprise client. They were a very large and well-known financial organization and I was sitting in a meeting with their senior technical staff. I was young and nervous at the meeting until I asked a question and heard the answer.</p> <p>&#8220;What&#8217;s the process, and how long does it take, to go from an initial concept to a launched product?&#8221;</p> <p>I expected the answer to be impressive. I expected the answer to be illuminating. I expected the answer to be interesting.</p> <p>What I hadn&#8217;t expected was an explicit answer. 18-24 months. That&#8217;s what it would take for a feature (not a new product or application) to go from concept to deployment.</p> <p>We&#8217;re not talking about a massive amount of code. Instead, I&#8217;m simply talking about a feature that might take 2 weeks to code. But it could take 40 times that to see the light of day.</p> <p>Because of who this company was, the focus was more on protection and prevention (of negative consequences) than on production.</p> <p>Big companies are like that. They move carefully. They move slowly. And as a result, they don&#8217;t necessarily innovate a lot.</p> <h2>Three reasons why you should hire small agencies</h2> <p>Those large companies, however, still need to hire agencies. You, too, will be faced with making a similar decision. But your decision criteria may be different.</p> <p>When large companies make their decisions on hiring an agency, some do it like they manage the rest of their days &#8211; so they hire to mitigate risk. They look for companies with large enough staff teams and tons of systems and processes to protect their interests.</p> <p>Others however make decisions differently. And they make them like you might make yours.</p> <p>They&#8217;re looking for a company who can innovate, who can do something new, different and something that may challenge the status quo.</p> <p>This is what I recommend for you as well.</p> <p>Small agencies offer three things that you may not find when you&#8217;re talking with a company that has more than 20-30 staff.</p> <ol> <li><strong>There are less miscommunication misunderstandings.</strong><br /> In companies where there are more than 30 people, you&#8217;ll likely talk with a person who will then talk with someone else about your project. You remember the telephone game. It can sometimes be like that. With a small agency, the key folks are often present at your meetings and will hear from you directly.</li> <li><strong>Less overhead means less cookie-cutter work.</strong><br /> The nature of a larger agency (think 100-200 people) is that you need more staff to manage everything &#8211; from production staff, to finances, to project management, to sales and marketing. The result of non-billable staff is that everyone else has to be highly productive. This drive for efficiencies can lead to agencies picking up more and more work that looks like their recent projects. And while that&#8217;s great for their productivity, it may not be the innovation you&#8217;re looking for.</li> <li><strong>Small agencies try harder.</strong><br /> You remember <a href="http://www.slate.com/articles/business/rivalries/2013/08/hertz_vs_avis_advertising_wars_how_an_ad_firm_made_a_virtue_out_of_second.html">the old Avis campaign</a>, right? Maybe the best ad campaign ever, &#8220;We try harder.&#8221; Small agencies rely on word of mouth and repeat business like everyone else, and to that end, work very hard to delight their clients. With less staff, however, they can&#8217;t afford to have to re-do work. As a result, you may find they&#8217;re working harder to earn your dollar.</li> </ol> <h2>Five small agencies to consider</h2> <p>The reality is that there are a ton of agencies out there that could help you. But because people are consistently asking me for recommendations, I thought I would give you five (in alphabetical order):</p> <ol> <li><a href="http://www.bourncreative.com/">Bourn </a><a href="http://www.bourncreative.com/" target="_blank">Creative</a> &#8211; This team knows how to combine branding, design and development to create brilliant WordPress websites for you.</li> <li><a href="http://ran.ge/" target="_blank">Range</a> &#8211; This team has worked on a number of high-profile publishing projects and understands editing workflows well!</li> <li><a href="http://reaktivstudios.com/" target="_blank">Reaktiv</a> &#8211; This team can help you build (on WordPress) what you thought was previously impossible.</li> <li><a href="https://zao.is/" target="_blank">Zao</a> &#8211; This team knows eCommerce incredibly well and can help your site&#8217;s performance.</li> <li><a href="http://zeek.com/" target="_blank">Zeek</a> &#8211; This team can do incredible work with WordPress, its API, and mobile applications.</li> </ol> <p>Are there others? Sure. And there are other agencies who are neither small (&lt;10) nor large (50+). And they&#8217;re great too.</p> <p>But I think you may find, like many large brands have, that when you hire small agencies you get a lot of bang for your buck.</p> <p>The post <a rel="nofollow" href="http://chrislema.com/hire-small-agencies/">Why it makes sense to hire small agencies</a> appeared first on <a rel="nofollow" href="http://chrislema.com">ChrisLema.com</a>.</p> text/html 2016-07-27T02:27:11+01:00 http://abetterplanetwp.com A Better Planet Spelunking into the Template Hierarchy http://feedproxy.google.com/~r/Nometech/~3/u6jjC4BAE28/ <p>The template hierarchy is one of my favorite features in WordPress. It not only makes child themes possible, but it also makes the whole ecosystem better because more code can be written to sit in smaller and smaller chunks. This is great. What&#8217;s also cool about it is that it&#8217;s all enabled by a few relatively small chunks of code. But staring at them starts to expose us to some of the most interesting parts of WordPress.</p> <p>This post assumes some familiarity with PHP, so if you never do it you may get a little turned-around. But it&#8217;s not too complicated and heady, so even a novice who sticks with us will certainly learn a thing or two.</p> <h2>A Quick Summary of the Template Hierarchy</h2> <p>This post will not contain an exhaustive summary of the template hierarchy. But some understanding is useful. The template hierarchy basically does two things in WordPress:</p> <ol> <li>It allows for a theme to easily contain many different files for different common cases in WordPress: category archives, single post pages, etc which can each exist independently. The template hierarchy is WordPress&#8217;s way of picking among them and making a theme-author&#8217;s job a bit easier.</li> <li>It allows a child theme to step into that same process that the parent theme uses and override individual template choices with its own. This is what makes child themes so powerful: they can quickly change small parts of the parent theme without having to do everything.</li> </ol> <p>It looks a little like this:</p> <p><a href="https://wpshout.com/media/2016/07/wordpress-template-hierarchy.png"><img class="aligncenter wp-image-10556 size-large" src="https://wpshout.com/media/2016/07/wordpress-template-hierarchy-1024x591.png" alt="wordpress-template-hierarchy" width="1024" height="591" srcset="https://wpshout.com/media/2016/07/wordpress-template-hierarchy-1024x591.png 1024w, https://wpshout.com/media/2016/07/wordpress-template-hierarchy-750x433.png 750w, https://wpshout.com/media/2016/07/wordpress-template-hierarchy-300x173.png 300w, https://wpshout.com/media/2016/07/wordpress-template-hierarchy-768x443.png 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></p> <p>And I always say it, but my favorite place to quickly glance the WordPress template hierarchy is <a href="https://wphierarchy.com/">wphierarchy.com</a>.</p> <h2>The Core Function for Child Themes: <code>locate_template</code></h2> <p>So the template hierarchy requires two core things: that the child theme is checked for files before the parent theme, and that the whole hierarchy proceeds in the way theme authors have been shown it does. Most of the logic that accomplishes the second is in <code>/wp-includes/template-loader.php</code>. More on that later.</p> <p>Most of the logic that accomplishes the child theme compatibility is in the <code>locate_template</code> function in <code>/wp-includes/template.php</code>. That function looks like this:</p> <pre><code class="language-php">function locate_template($template_names, $load = false, $require_once = true ) { $located = ''; foreach ( (array) $template_names as $template_name ) { if ( !$template_name ) continue; if ( file_exists(STYLESHEETPATH . '/' . $template_name)) { $located = STYLESHEETPATH . '/' . $template_name; break; } elseif ( file_exists(TEMPLATEPATH . '/' . $template_name) ) { $located = TEMPLATEPATH . '/' . $template_name; break; } } if ( $load &amp;&amp; '' != $located ) load_template( $located, $require_once ); return $located; } </code></pre> <p>Essentially, <code>locate_template</code> is called with an array of templates it should look for. Its core business is the <code>foreach</code> loop, where it first looks to assure that the passed element of the array is a string. If it is, it them looks in the child theme folder (<code>STYLESHEETPATH</code> is the child theme filesystem path) for a file of the given name — think &#8220;<code>archive.php</code>”. If it finds it, it <code>break</code>s out of the <code>foreach</code>. That is: it stops looping and moves to the end of the loop. If it doesn&#8217;t find it in then looks in the &#8220;parent&#8221; theme (again, <code>TEMPLATEPATH</code> is the parent theme filesystem path).</p> <p>That&#8217;s all there really is to it. It loops though all the files in a given array, and if it finds no files that match it returns the initially set <code>$located</code> value of an empty string. If it finds one that matches as it walks that list in the child theme or (then) the parent theme, it&#8217;ll return the string of the full path to that file. It&#8217;ll also, depending on how it&#8217;s been called, load the file to save the caller an extra pass to the <code>load_template</code> function themselves.</p> <p>It&#8217;s a pretty simple function, <code>locate_template</code>, and there&#8217;s not a whole bunch of global variables in use in it which I like. But even still it&#8217;s the entire reason that the template hierarchy — and the related functions like <code>get_template_part()</code> and <code>get_header()</code> — works with child themes. Pretty neat!</p> <h2>The Actual Template Hierarchy in Code</h2> <p>It wasn&#8217;t until this week in researching this article that I&#8217;d actually taken the time to track down the template hierarchy itself inside of WordPress. I think it speaks well of the projects robustness that I&#8217;d never had the need to find that code. I think it speaks poorly of my curiosity though.</p> <p>In any case, how does the template hierarchy get walked through so that a request for a blog post stops at <code>single.php</code> if the theme(s) have it, but progresses all the way to <code>index.php</code> if they don&#8217;t?</p> <p>Basically all requests to a WordPress site go through the <code>index.php</code> file in the project root. That contains the lines:</p> <pre><code class="language-php">define('WP_USE_THEMES', true); /** Loads the WordPress Environment and Template */ require( dirname( __FILE__ ) . '/wp-blog-header.php' ); </code></pre> <p>That pull in <code>wp-blog-header.php</code>. And <code>wp-blog-header.php</code> contains these times:</p> <pre><code class="language-php">if ( !isset($wp_did_header) ) { $wp_did_header = true; require_once( dirname(__FILE__) . '/wp-load.php' ); wp(); require_once( ABSPATH . WPINC . '/template-loader.php' ); } </code></pre> <p>The one that&#8217;s interesting to us is the last line: <code>require_once( ABSPATH . WPINC . '/template-loader.php' );</code>. That&#8217;s the file that then contains the template hierarchy if a theme will be used to show the page. That file is too big to show in full, but the core part that&#8217;s interesting to us is lines 58-91, which say:</p> <pre><code class="language-php">if ( defined('WP_USE_THEMES') &amp;&amp; WP_USE_THEMES ) : $template = false; if ( is_404() &amp;&amp; $template = get_404_template() ) : elseif ( is_search() &amp;&amp; $template = get_search_template() ) : elseif ( is_front_page() &amp;&amp; $template = get_front_page_template() ) : elseif ( is_home() &amp;&amp; $template = get_home_template() ) : elseif ( is_post_type_archive() &amp;&amp; $template = get_post_type_archive_template() ) : elseif ( is_tax() &amp;&amp; $template = get_taxonomy_template() ) : elseif ( is_attachment() &amp;&amp; $template = get_attachment_template() ) : remove_filter('the_content', 'prepend_attachment'); elseif ( is_single() &amp;&amp; $template = get_single_template() ) : elseif ( is_page() &amp;&amp; $template = get_page_template() ) : elseif ( is_singular() &amp;&amp; $template = get_singular_template() ) : elseif ( is_category() &amp;&amp; $template = get_category_template() ) : elseif ( is_tag() &amp;&amp; $template = get_tag_template() ) : elseif ( is_author() &amp;&amp; $template = get_author_template() ) : elseif ( is_date() &amp;&amp; $template = get_date_template() ) : elseif ( is_archive() &amp;&amp; $template = get_archive_template() ) : elseif ( is_comments_popup() &amp;&amp; $template = get_comments_popup_template() ) : elseif ( is_paged() &amp;&amp; $template = get_paged_template() ) : else : $template = get_index_template(); endif; /** * Filter the path of the current template before including it. * * @since 3.0.0 * * @param string $template The path of the template to include. */ if ( $template = apply_filters( 'template_include', $template ) ) include( $template ); return; endif; </code></pre> <p>One giant if block, followed by a simple PHP <code>include</code> call. That is the template hierarchy in all it&#8217;s simple glory! How does this whole thing work?</p> <p>Most WordPress developers will have some experience with the functions like <code>is_404()</code>. They answer whether or not the current page displayed is of that type. That&#8217;s all been set up before here, so we can treat it as a magic black-box that those work. So those tags are used in concert with the <code>template = get_404_template()</code>-like calls. And those, under the hood, almost all call <code>locate_template</code>. In the case of 404s, the function looks like:</p> <pre><code class="language-php">function get_404_template() { return get_query_template('404'); } </code></pre> <p>For its part, <code>get_query_template</code> is little more than a wrapper to take the passed <code>'404'</code> string and change it into <code>404.php</code> and then call <code>locate_template</code> with that as the array. (<code>get_query_template</code> also does some basic sanitization, and has an <code>apply_filters</code> call in it, but that&#8217;s it really.</p> <p>So how does the template hierarchy get walked? By a giant <code>if</code> block. If there&#8217;s no 404 template file, it&#8217;ll go onto the next branch condition and so on at length. Nothing too complicated. And if none of them are found the result of <code>get_index_template()</code> — which gets <code>index.php</code> — is the final resort, as we know of the template hierarchy. Pretty neat, no?</p> <h2>What We Learned About the Template Hierarchy</h2> <p>Hopefully, we&#8217;ve demonstrated that a few simple programming features: a big if-elseif-else tree and a loop with some basic <code>file_exists</code> conditionals is sufficient to make the entire template hierarchy run.</p> <p>My hope is that that knowledge makes you more comfortable diving deep into WordPress and some of it&#8217;s core technologies. It&#8217;s not the case that the template hierarchy is too esoteric for most developers, though they may initially think so. Most programming is not complicated because of esoterica, but just because you aren&#8217;t familiar with where and how the logic is arranged. When that knowledge becomes lived confidence whole new levels of understanding open up for you. Happy hacking!</p> <div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/Nometech?a=u6jjC4BAE28:0qT_8yVFdCs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Nometech?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nometech?a=u6jjC4BAE28:0qT_8yVFdCs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Nometech?i=u6jjC4BAE28:0qT_8yVFdCs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nometech?a=u6jjC4BAE28:0qT_8yVFdCs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/Nometech?i=u6jjC4BAE28:0qT_8yVFdCs:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nometech?a=u6jjC4BAE28:0qT_8yVFdCs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Nometech?i=u6jjC4BAE28:0qT_8yVFdCs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nometech?a=u6jjC4BAE28:0qT_8yVFdCs:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/Nometech?d=I9og5sOYxJI" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/Nometech/~4/u6jjC4BAE28" height="1" width="1" alt=""/> text/html 2016-07-26T23:00:37+01:00 http://abetterplanetwp.com A Better Planet A Guide To WP_Query http://torquemag.io/2016/07/a-guide-to-wp_query/ <p>When I started out as a WordPress developer,  I was working with object-oriented PHP before I even really knew what it was, thanks to WordPress post API class, WP_Query.</p> <p>In that article, I said that PHP has two data types that are considered &#8220;compound,&#8221; meaning we can store more than one piece of data in them. In PHP, objects and arrays are the only two data types that are actually considered compound.</p> <p>Objects are similar to arrays in that they provide structure for storing data, however, unlike arrays, objects are created with blueprints called classes, which can contain functions.</p> <p>In this article, we&#8217;re going to look at WP_Query as a way of understanding how classes and objects work.</p> <h2>A Little Background</h2> <p>Before we dive in, let&#8217;s talk about syntax and terminology. It’s important to make sure you  have a good understanding of the terms &#8220;class,&#8221; &#8220;object&#8221; and &#8220;instance.&#8221; In any program, you can only have a class of a given name once. If I were to create a class in a WordPress plugin called &#8220;WP_Query&#8221; I would get a fatal error, since that class is already defined.</p> <p>Classes are not actually objects but rather they are rules for creating an object. We can create as many objects of the WP_Query class as we want, however, each time we do, we are instantiating a new instance of the WP_Query class.</p> <p>As I noted at the beginning of  this article, arrays and objects are similar in that they can both contain other data types. With arrays, we use bracket notation to define and access index or keys of an array. With objects, we don&#8217;t have keys or indexes, instead, we have properties. Properties act just like variables, except they are inside of an object.</p> <p>For example look at this class:</p><pre class="crayon-plain-tag">class say_hi { public $hello = 'Hi Roy'; }</pre><p>In this class, we have a property called &#8220;hello.&#8221; It looks like a variable and acts like a variable but can only be accessed in the context of the class.</p> <p>If we instantiate an object of this class by adding the keyword “new,” then we can access the property like this:</p><pre class="crayon-plain-tag">$hi = new say_hi(); echo $hi-&gt;hello;</pre><p>Classes are more than just containers for data stored in properties. They also encapsulate functionality. Inside of a class, a function is called a method. Methods are like functions, but they can only be used in the context of the object they are a part of. This allows us to make use of property or method visibility, as well as processing the data stored in the properties of the object.</p> <p>Let&#8217;s add a method to this class that will work with the property we defined:</p><pre class="crayon-plain-tag">class say_hi { public $hello = 'Hi Roy'; public function hi_roy(){ echo $this-&gt;hello; } }</pre><p>Inside of a class, the current instance is held in a special variable called $this. That&#8217;s why we had to use $this to access the property. Just like functions outside of classes, methods define their own scope. That is why we can have a variable, with the same name as a class property:</p><pre class="crayon-plain-tag">class say_hi { public $hello = 'Hi Roy'; public function hi_roy(){ return $this-&gt;hello; } public function hi_shawn(){ $hello = 'Hi Shawn'; return $hello; } }</pre><p>Methods are also accessed using the special property $this. One thing to keep in mind is that you should never have a method with the same name as a class. In PHP4 and PHP5 this acted as a static constructor.</p> <h2>WP_Query</h2> <p>Now that we have the right terminology in place, we can move on to WP_Query.</p> <p>WP_Query is WordPress&#8217; posts API, we use it to get collections of posts, which we store in the $posts property of WP_Query, determine information about the post collection and loop through those collections.</p> <p>If you&#8217;ve ever done any WordPress development, you&#8217;ve seen a standard WordPress posts loop like this:</p><pre class="crayon-plain-tag">if ( have_posts() ) { while ( have_posts() ) { the_post(); the_content(); } }</pre><p>If you look inside of all of those functions &#8212; seriously you should, reading the source is important for mastering WordPress &#8212; you will see they are all using an object stored in the global variable $wp_query. Most of the standard &#8220;template tags&#8221; we use in WordPress are written this way.</p> <p>The shortest explanation of what WordPress does, in the front-end, is it creates a WP_Query object, based on the current URL, and places it in the global variable $wp_query.</p> <p>As a result, we could rewrite that loop like this:</p><pre class="crayon-plain-tag">global $wp_query; if ( $wp_query-&gt;have_posts() ) { while ( $wp_query-&gt;have_posts() ) { $wp_query-&gt;the_post(); echo apply_filters( 'the_content', $wp_query-&gt;post-&gt;post_content ); } }</pre><p>While this is unnecessarily complicated versus the normal way of making a loop, this way makes it clear that what we are doing in the loop, is iterating through the posts &#8212; to be more specific the objects of the WP_Post class &#8212; stored in the posts property of the WP_Query instance stored in the global variable $wp_query.</p> <p>This &#8220;main instance&#8221; of WP_Query, doesn&#8217;t have to be the only one. A recent posts or popular posts widget can exist on the same page, and will use a different instance of the WP_Query class to get and display those collections of posts.</p> <h3>Making Your Own</h3> <p>I said earlier that instances of classes are created using the new keyword. I also said that class instance can contain different data in their properties. That means that even though they have the same methods, those methods will behave differently since they are acting on different data.</p> <p>Property values get set in one of two ways: internally by the object or by modifying the property externally. Most of the properties of WP_Query are public, so we could technically change them from outside of the object, but that&#8217;s not a great idea.</p> <p>Normally with WP_Query, we pass it an array of arguments that define what posts it should query for, and that sets its properties internally. I&#8217;m not going to walk you through <a href="https://codex.wordpress.org/Class_Reference/WP_Query#Parameters">every parameter of WP_Query</a>.</p> <p>We can pass our array of arguments into the object when we instantiate. For example, to tell WP_Query to get 5 posts of the &#8220;my-product&#8221; post type, we could do this:</p><pre class="crayon-plain-tag">$args = [ 'post_type' =&gt; 'my-product', 'posts_per_page' =&gt; 5 ]; $query = new WP_Query( $args );</pre><p>When we create an instance this way &#8212; passing arguments inside of two parentheses, we are passing those arguments to the class&#8217; __construct() method. Constructors are a type of <a href="http://torquemag.io/2016/05/wordpress-developers-need-know-php-magic-methods/">magic method</a>, that is called when the class instantiated. These methods can accept any number of arguments, WP_Query&#8217;s constructor method takes one argument, but other classes take more.</p> <h2>WordPress As A Gateway To Object-Oriented Programming</h2> <p>WordPress may not be a totally object-oriented application, but we have classes for all of our content types that we use for finding and iterating through collections of posts, using WP_Query; users, via WP_User_query; taxonomy terms, using WP_Tax_Query and comments thanks to WP_Comment_Query.</p> <p>I would encourage you to read through each of these classes &#8212; not the docs &#8212; the source code and make yourself more familiar with how they work, what properties they have and what methods you can use from them.</p> <p>Understanding these basic query APIs will make your life as a WordPress developer easier. It will also help you learn how classes are designed.</p> <div id="author-bio-box" style="background: #f8f8f8; border-top: 2px solid #cccccc; border-bottom: 2px solid #cccccc; color: #333333"><h3><a style="color: #555555;" href="http://torquemag.io/author/joshp/" title="All posts by Josh Pollock" rel="author">Josh Pollock</a></h3><div class="bio-gravatar"><img alt='' src='http://0.gravatar.com/avatar/90f0d6d84cc52508796d039eb81c4f06?s=70&#038;d=mm&#038;r=g' srcset='http://0.gravatar.com/avatar/90f0d6d84cc52508796d039eb81c4f06?s=140&amp;d=mm&amp;r=g 2x' class='avatar avatar-70 photo' height='70' width='70' /></div><a target="_blank" href="http://JoshPress.net" class="bio-icon bio-icon-website"></a><a target="_blank" href="http://twitter.com/Josh412" class="bio-icon bio-icon-twitter"></a><a target="_blank" href="https://plus.google.com/+JoshPollock/" class="bio-icon bio-icon-googleplus"></a><a target="_blank" href="https://www.youtube.com/channel/UC9HykN0jpm2mPwndnAtwm5Q" class="bio-icon bio-icon-youtube"></a><p class="bio-description">Josh is a WordPress plugin developer and educator. He is the owner and a developer for <a href="https://CalderaWP.com" title="CalderaWP: Transform Your WordPress Experience">CalderaWP</a>, makers of <a href="http://CalderaForms.com">Caldera Forms</a>, a different kind of and <a href="https://IngotHQ.com">the native WordPress A/B testing solution</a>.</p></div> <div class='ctx-subscribe-container ctx-clearfix ctx_default_placement'></div><div class='ctx-social-container ctx-clearfix ctx_default_placement'></div><div class='ctx-module-container ctx-clearfix ctx_default_placement'></div><div id="epoch-width-sniffer"></div><p>The post <a rel="nofollow" href="http://torquemag.io/2016/07/a-guide-to-wp_query/">A Guide To WP_Query</a> appeared first on <a rel="nofollow" href="http://torquemag.io">Torque</a>.</p> text/html 2016-07-26T21:00:42+01:00 http://abetterplanetwp.com A Better Planet JavaScript for WordPress Developers: Getting Started With Objects https://premium.wpmudev.org/blog/javascript-wordpress-objects/ <p>Objects are one of the most important and most powerful features of JavaScript and many built-in features use objects natively.</p> <p>Essentially, an object is a collection of properties, and a property consists of a key and a value. In this sense, objects in JavaScript are akin to associative arrays in PHP but the similarities end there.</p> <p>This is the second post in our four-part series focusing on JavaScript for WordPress developers. Throughout this series, you’ll learn the basics but I’ll presume you already have a working knowledge of HTML and CSS. If you need help with these building blocks, take a look at our series about <a href="https://premium.wpmudev.org/blog/wordpress-development-beginners-getting-started/">WordPress Development for Beginners</a>.</p> <p>In the last article in this series, we looked at <a href="https://premium.wpmudev.org/blog/javascript-wordpress-basics/">the very basics of JavaScript</a> – how to add to a page and use variables and functions. In this tutorial, we&#8217;ll focus on commonly used objects in JavaScript.</p> <p><span id="more-157010"></span></p> <h3>Objects</h3> <p>Let&#8217;s dive straight in by looking at an example of an object in JavaScript:</p> <style>.gist table { margin-bottom: 0; }</style><script src="https://gist.github.com/d8038c332948fbb10aaad64ce3eee56c.js?file=first-object.js"></script> <p>This is a very simple object with four properties. The first property has the key &#8220;name&#8221; and the value &#8220;Daniel Pataki.&#8221; As you can see from the other properties, values may use many different data types.</p> <p>What makes objects so useful, but also a little confusing, is that property values can also be functions. If you&#8217;ve copy-pasted some jQuery code before you may have seen this in action in the form of callback functions, which looks something like this:</p> <style>.gist table { margin-bottom: 0; }</style><script src="https://gist.github.com/d8038c332948fbb10aaad64ce3eee56c.js?file=object-with-function.js"></script> <p>The code above would send a post request to the given URL. The &#8220;complete&#8221; property invokes a function, which is run when the request has been completed. To see how this would work let&#8217;s quickly write a function of our own:</p> <style>.gist table { margin-bottom: 0; }</style><script src="https://gist.github.com/d8038c332948fbb10aaad64ce3eee56c.js?file=function-call.js"></script> <p>The object contains a name property and a greeting property, which is a function. Once defined we can invoke that function using the dot syntax: <code>me.greeting</code>. You can even reference properties from within the same object using the <code>this</code> keyword.</p> <p>If you&#8217;ve worked with PHP objects before the idea is very similar. The simplicity of the syntax throws people sometimes, but there is tremendous power within.</p> <h3>Working With Objects</h3> <p>Let&#8217;s take a step back and learn how to create and manipulate objects. An object is always encased in curly braces. Property names can be unquoted but must be quoted if they contain special characters like dashes. Property values can be of multiple types including strings, integers, arrays and other objects.</p> <p>Let&#8217;s create a test object with some useful information we can manipulate:</p> <style>.gist table { margin-bottom: 0; }</style><script src="https://gist.github.com/d8038c332948fbb10aaad64ce3eee56c.js?file=object.js"></script> <p>To get the value of a property you can use the dot notation or the square bracket notation. The bracket notation is useful if you want to use a variable property name. Take a look at the example below:</p> <style>.gist table { margin-bottom: 0; }</style><script src="https://gist.github.com/d8038c332948fbb10aaad64ce3eee56c.js?file=retrieve-values.js"></script> <p>And here&#8217;s what it looks like in the browser console:</p> <div class="pic-full "> <figure style="width: 735px" class="wp-caption aligncenter"><img class="attachment-735x735 size-735x735" src="https://premium.wpmudev.org/blog/wp-content/uploads/2016/07/logging-the-object.png" alt="Logging object values" width="735" height="258" /><figcaption class="wp-caption-text">Logging object values</figcaption></figure> </div> <p>You can use a function contained within an object similarly, just add a parenthesis at the end (and parameters if needed).</p> <style>.gist table { margin-bottom: 0; }</style><script src="https://gist.github.com/d8038c332948fbb10aaad64ce3eee56c.js?file=object-functions.js"></script> <p>The function calculates reading time by presuming a reading speed of 2.5 minutes per page. I multiplied the total page count by 2.5 to arrive at the number of minutes required for a complete read through. I then divide by 60 to arrive at the number of hours needed.</p> <p>In the previous article, we created an example where we listed some tweets using an array, but we can make our example a lot more flexible using objects. Here&#8217;s the complete code re-written to use objects:</p> <style>.gist table { margin-bottom: 0; }</style><script src="https://gist.github.com/d8038c332948fbb10aaad64ce3eee56c.js?file=tweets-object-1.js"></script> <p>The biggest change you&#8217;ll see is that instead an array of tweets and a username given separately, I&#8217;ve created an array of tweet objects. Each tweet object contains the tweet and the username. This removes the uncertainty of passing in the username from somewhere else.</p> <p>The <code>tweet()</code> function now uses the object&#8217;s properties instead of separate arguments and I&#8217;ve removed <code>document.write</code> to make sure it just returns a string, which can then be used anywhere.</p> </div><!-- end container --><div class="full-blogad full-blogad-courses" id="full-blogad-156655"><div class="full-blogad-container"><div class="row"><div class="col-sm-24 col-md-11 col-md-offset-1"> <h3>COURSES</h3> <h4>WP Academy – WordPress Wisdom, Bitesized.</h4> <p>Structured e-learning to expand your WordPress and general business horizons. Learn from people like our very own CEO James Farmer with more than a decade’s experience running a WordPress Business!.</p> <a href="https://premium.wpmudev.org/academy" class="ghost-button-arrow i-wpmudev-tail-arrow open-trial">LEARN MORE</a> </div> <div class="col-sm-24 col-md-10 col-md-offset-2"> <img src="https://premium.wpmudev.org/wp-content/themes/wpmudev-2015-1/assets/img/trial/courses.svg"> </div></div><!-- end row --></div><!-- end full-blogad-container --></div><!-- end full-blogad --><div class="container"> <h3>Using Constructors</h3> <p>Currently, our code is not bad but it could still be a lot better. We will probably never need to display a tweet without a tweet object, so we shouldn&#8217;t really define our <code>tweet</code> function outside of the object. If we use the same structure we would need to add a <code>display_tweet()</code> function into all three objects.</p> <p>This is where constructors come in. If you&#8217;re familiar with object-oriented PHP this is similar to using classes and objects in PHP. Think of a constructor as a way to initialize a class. Let me show you some code to make this clearer:</p> <style>.gist table { margin-bottom: 0; }</style><script src="https://gist.github.com/d8038c332948fbb10aaad64ce3eee56c.js?file=constructor.js"></script> <p>&nbsp;</p> <p>Let&#8217;s start with <code>tweet_1</code>. I used <code>new Tweet()</code> to call the <code>Tweet</code> function, passing in two parameters. The function is a constructor that creates properties for the object dynamically. It assigns the first parameter to <code>this.text</code> and the second to <code>this.username</code>. It also creates a <code>this.display</code> function that displays the tweet.</p> <p>Within the function we can refer to properties using the <code>this</code> keyword. Outside of the function we use the dot notation. To log the first tweet&#8217;s text we use <code>tweet_1.text</code>, to log the tweet display for the second one we use <code>tweet_2.display()</code>.</p> <p>The beauty of this is its reusability. You can create as many tweets you like by creating a new object using the <code>Tweet</code> class. The object will contain all the functions and other elements it needs to function.</p> <p>Let&#8217;s rewrite our tweet example with constructors in mind:</p> <style>.gist table { margin-bottom: 0; }</style><script src="https://gist.github.com/d8038c332948fbb10aaad64ce3eee56c.js?file=tweets-object-2.js"></script> <p>That&#8217;s a lot cleaner and a lot more understandable. I&#8217;ve added the ability to add a prefix and a suffix to the tweet to give it some extra flexibility. This way we can display it as a list element easily.</p> <h3>Overview</h3> <p>In this tutorial, we delved into JavaScript objects and learned how they can be used to create data structures to make our code neater, better to understand and more flexible. Along with the previous tutorial you should now be up to speed on arrays, variables and basic JavaScript.</p> <p>In the next tutorial, we&#8217;ll take a look at jQuery, the JavaScript framework used heavily by WordPress. You&#8217;ll learn how to manipulate websites so you can create great things like toggle sections, date drop-downs and more.</p> <div class='yarpp-related-rss'> <p>Related posts:</p><ol> <li><a href="https://premium.wpmudev.org/blog/javascript-for-wordpress-people/" rel="bookmark" title="JavaScript for WordPress People: What You Need to Know">JavaScript for WordPress People: What You Need to Know </a> <small>At WordCamp US, WordPress co-founder Matt Mullenweg used his State...</small></li> <li><a href="https://premium.wpmudev.org/blog/javascript-wordpress-basics/" rel="bookmark" title="JavaScript for WordPress Developers: Learning the Basics">JavaScript for WordPress Developers: Learning the Basics </a> <small>JavaScript was developed over 20 years ago at Netscape and...</small></li> <li><a href="https://premium.wpmudev.org/blog/load-posts-ajax/" rel="bookmark" title="Loading WordPress Posts Dynamically With AJAX">Loading WordPress Posts Dynamically With AJAX </a> <small>AJAX lets you automagically refresh your content without having to...</small></li> <li><a href="https://premium.wpmudev.org/blog/javascript-resources-wordpress/" rel="bookmark" title="13 Killer JavaScript Resources to Get Up to Speed for WordPress">13 Killer JavaScript Resources to Get Up to Speed for WordPress </a> <small>If you’ve heard that JavaScript is the new PHP (or...</small></li> </ol> </div> text/html 2016-07-26T21:00:27+01:00 http://abetterplanetwp.com A Better Planet Hosting Office Hours with Carrie Dils https://tommcfarlin.com/hosting-office-hours-with-carrie-dils/ <p>Many of you are likely familiar with Office Hours with Carrie Dils. But if not, here&#8217;s what <a href="http://officehours.fm/">the show</a> is all about:</p> <blockquote><p>Every Thursday at 2p ET as Carrie interviews a variety of folks within the WordPress ecosystem, from plugin developers to marketers to business owners. The one thing they have in common? Each guest has found business success through leveraging WordPress as both a tool and a platform.</p></blockquote> <p>I had the honor of appearing on the show in previous episodes and had a great time. I also recommend tuning in when you have a chance as it&#8217;s a great, free opportunity to hear and learn from others.</p> <p><img class="aligncenter size-full wp-image-36257" src="https://tommcfarlin.com/wp-content/uploads/2016/07/officehours.png" alt="Office Hours with Carrie Dils" width="700" height="611" srcset="https://tommcfarlin.com/wp-content/uploads/2016/07/officehours.png 700w, https://tommcfarlin.com/wp-content/uploads/2016/07/officehours-300x262.png 300w" sizes="(max-width: 700px) 100vw, 700px" /></p> <p>Weeks ago, <a href="https://twitter.com/cdils">Carrie</a> celebrated her <a href="http://officehours.fm/podcast/100-2/">100th episode</a> (which is an awesome feat in and of itself).</p> <p><span id="more-36255"></span></p> <h2>Office Hours with Carrie Dils</h2> <p>Though it&#8217;s been a few months since this episode aired, Carrie and I have talked about doing an episode where we flip the process around a bit and we let the audience run an episode and interview Carrie.</p> <p>And that&#8217;s what we&#8217;re planning to do.</p> <p>This Thursday, July 28th, the next episode of Office Hours will run as normal. Carrie will have the feed set up and will be recording, airing, and available on Twitter as usual.</p> <p>But here&#8217;s the change: Rather than Carrie interviewing someone on the show, we&#8217;ll all be able to interview her.</p> <p>Specifically, here&#8217;s the plan:</p> <ul> <li>Though Carrie will be running the show as normal, I&#8217;ll be &#8220;hosting&#8221; the episode by acting as a proxy for the questions, monitoring Twitter, reading questions you&#8217;ve sent to me, and so on.</li> <li>Because we want to make sure the episode is as off-the-cuff as possible, I&#8217;d like to have questions either submitted via email or submitting on Twitter (versus having the submitted in the comments of this post).</li> <li>For those who have never tuned into the show, you can get all of the information on the show&#8217;s <a href="http://officehours.fm/">homepage</a>. Plan to tune in at 2pm EST.</li> </ul> <p>If nothing else, remember to tune in and to follow <a href="https://twitter.com/hashtag/officefm">the hashtag</a> on Twitter. And for those who want to participate, you can contact me using the form on <a href="https://tommcfarlin.com/contact/">this page</a> or <a href="https://twitter.com/tommcfarlin">via Twitter</a>, as well.</p> <p>Finally, congratulations to Carrie for 100+ episodes of her show. Now let&#8217;s use this opportunity to have some fun and also learn from her.</p> <p><a rel="nofollow" href="https://tommcfarlin.com/hosting-office-hours-with-carrie-dils/">Hosting Office Hours with Carrie Dils</a> was written by <a rel="nofollow" href="https://tommcfarlin.com/author/tom/">Tom</a>. For more on WordPress, development, and resources then visit <a rel="nofollow" href="https://tommcfarlin.com">Tom McFarlin</a>'s blog.</p> text/html 2016-07-26T01:02:20+01:00 http://abetterplanetwp.com A Better Planet Best WordPress Push Notification Plugins to Increase Returning Visitors http://www.wpexplorer.com/wordpress-push-notification-plugins/ text/html 2016-07-25T19:00:39+01:00 http://abetterplanetwp.com A Better Planet Fix White Text & Missing Buttons in the WordPress Editor https://www.wpkube.com/fix-white-text-missing-buttons-wordpress-editor/ text/html 2016-07-25T16:38:06+01:00 http://abetterplanetwp.com A Better Planet A Quick Guide To Internal Links For SEO http://winningwp.com/internal-links-for-seo/ text/html 2016-07-25T00:49:58+01:00 http://abetterplanetwp.com A Better Planet Wharf to Wharf Race Time-lapse Video https://ma.tt/2016/07/wharf-to-wharf-race-time-lapse-video/ <p><iframe class='youtube-player' type='text/html' width='604' height='370' src='https://www.youtube.com/embed/3YvF1a-0QP8?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p> <p>Caught a time-lapse from the first runners to some of the last walkers, and a cool band &#8220;The Noisy Neighbors&#8221; playing for this year&#8217;s Wharf to Wharf race in Santa Cruz. Video is about 23 seconds, if you look closely you can see the front-runners at the very beginning.</p> text/html 2016-07-22T15:05:53+01:00 http://abetterplanetwp.com A Better Planet The Aesthetic Of Non-Opinionated Content Management: A Beginner’s Guide To ProcessWire https://www.smashingmagazine.com/2016/07/the-aesthetic-of-non-opinionated-content-management-a-beginners-guide-to-processwire/ text/html 2016-07-21T12:14:59+01:00 http://abetterplanetwp.com A Better Planet wpMail.me issue#264 http://wpmail.me/newsletter/wpmail-me-issue264/ text/html 2016-07-21T01:49:17+01:00 http://abetterplanetwp.com A Better Planet WordPress 4.6 Beta 4 https://wordpress.org/news/2016/07/wordpress-4-6-beta-4/ <p>WordPress 4.6 Beta 4 is now available!</p> <p><strong>This software is still in development,</strong> so we don’t recommend you run it on a production site. Consider setting up a test site just to play with the new version. To test WordPress 4.6, try the <a href="https://wordpress.org/plugins/wordpress-beta-tester/">WordPress Beta Tester</a> plugin (you’ll want “bleeding edge nightlies”). Or you can <a href="https://wordpress.org/wordpress-4.6-beta4.zip">download the beta here</a> (zip).</p> <p>For more information on what’s new in 4.6, check out the <a href="https://wordpress.org/news/2016/06/wordpress-4-6-beta-1/">Beta 1</a>, <a href="https://wordpress.org/news/2016/07/wordpress-4-6-beta-2/">Beta 2</a>, and <a href="https://wordpress.org/news/2016/07/wordpress-4-6-beta-3/">Beta 3</a> blog posts, along with <a href="https://make.wordpress.org/core/tag/4-6+dev-notes/">in-depth field guides</a>. This is the final <a href="https://make.wordpress.org/core/version-4-6-project-schedule/">planned beta</a> of WordPress 4.6, with a release candidate scheduled for next week.</p> <p>Some of the fixes in Beta 4 include:</p> <ul> <li><strong>Media</strong>: <code>alt</code> attributes are now always added to images inserted from URLs (<a href="https://core.trac.wordpress.org/ticket/36735">#36735</a>).</li> <li>Object subtype handling has been removed from <code>register_meta()</code>. Details about this change are explained in <a href="https://make.wordpress.org/core/2016/07/20/additional-register_meta-changes-in-4-6/">a post for developers</a>.</li> <li><strong>Resource hints</strong> are now limited to enqueued assets (<a href="https://core.trac.wordpress.org/ticket/37385">#37385</a>).</li> <li>A regression with query alterations introduced by the new <code>WP_Term_Query</code> has been fixed (<a href="https://core.trac.wordpress.org/ticket/37378">#37378</a>).</li> <li>The Ajax searches for <strong>installed and new plugins</strong> have been enhanced to fix several accessibility issues and to improve compatibility with older browsers. (<a href="https://core.trac.wordpress.org/ticket/37233">#37233</a>, <a href="https://core.trac.wordpress.org/ticket/37373">#37373</a>)</li> <li>The media player <strong>MediaElement.js</strong> has been updated to 2.22.0 to fix YouTube video embeds (<a href="https://core.trac.wordpress.org/ticket/37363">#37363</a>).</li> <li>The <strong>Import screen</strong> was overhauled, improving accessibility and making it much easier to install and run an importer (<a href="https://core.trac.wordpress.org/ticket/35191">#35191</a>).</li> <li><strong>Emoji support</strong> has been updated to include all of the latest Unicode 9 emoji characters (<a href="https://core.trac.wordpress.org/ticket/37361">#37361</a>). 🤠🥕🥓<img src="https://s.w.org/images/core/emoji/2/72x72/1f57a.png" alt="🕺" class="wp-smiley" style="height: 1em; max-height: 1em;" /><img src="https://s.w.org/images/core/emoji/2/72x72/1f3fd.png" alt="🏽" class="wp-smiley" style="height: 1em; max-height: 1em;" />🤝<img src="https://s.w.org/images/core/emoji/2/72x72/1f3ff.png" alt="🏿" class="wp-smiley" style="height: 1em; max-height: 1em;" /></li> <li><strong>Various bug fixes</strong>. We’ve made <a href="https://core.trac.wordpress.org/log/trunk/src?action=stop_on_copy&amp;mode=stop_on_copy&amp;rev=38123&amp;stop_rev=38060&amp;limit=200&amp;verbose=on">more than 60 changes</a> during the last week.</li> </ul> <p>Do you speak a language other than English? <a href="https://translate.wordpress.org/projects/wp/dev">Help us translate WordPress into more than 100 languages!</a></p> <p>If you think you’ve found a bug, you can post to the <a href="https://wordpress.org/support/forum/alphabeta">Alpha/Beta area</a> in the support forums. Or, if you’re comfortable writing a bug report, <a href="https://core.trac.wordpress.org/">file one on the WordPress Trac</a>. There, you can also find <a href="https://core.trac.wordpress.org/tickets/major">a list of known bugs</a> and <a href="https://core.trac.wordpress.org/query?status=closed&amp;group=component&amp;milestone=4.6">everything we’ve fixed</a>.</p> <p>Happy testing!</p> <p><em>This is Beta 4,</em><br /> <em>The last before RC 1.</em><br /> <em>Please test all the things.</em></p> text/html 2016-07-13T23:06:51+01:00 http://abetterplanetwp.com A Better Planet bbPress 2.5.10 – Security Release https://bbpress.org/blog/2016/07/bbpress-2-5-10-security-release/ <p>bbPress 2.5.10 is out, and is a security release for all previous 2.x versions. 2.5.10 includes additional escaping on user display names in places where names &amp; avatars are commonly displayed together.</p> <p><em>These changes are internal to bbPress and do not affect any third-party themes or modifications to bbPress template parts. If you are using a third-party theme or template parts, you will inherit these fixes automatically.</em></p> <p>If you&#8217;re using any version of bbPress 2.x and have not yet updated, please take a moment to update your bbPress installations to 2.5.10. If you&#8217;re using WordPress&#8217;s built-in updater, it should only take a click or two. If you need help, please reach out in our <a href="https://bbpress.org/forums/">support forums</a> and someone will be happy to assist you.</p> <p>These fixes have also been ported over to 2.6, which we continue to run here at bbPress.org and BuddyPress.org.</p> <p>Thank you to HackerOne user psych0tr1a for identifying (and <a href="https://make.wordpress.org/core/handbook/testing/reporting-security-vulnerabilities/">responsibly disclosing</a>) these findings to the WordPress security team, who worked to get 2.5.10 out within a few hours from when the original report came in.</p> <hr /> <p>Speaking of bbPress 2.6, we&#8217;re working on refactoring per-forum moderators now, and we&#8217;ll have a beta ready for everyone to try shortly!</p> text/html 2016-07-13T03:37:53+01:00 http://abetterplanetwp.com A Better Planet Marketing yourself as a WordPress developer with Tonya Mork https://mattreport.com/marketing-wordpress-developer-tonya-mork/ <p>Marketing sucks for (most) WordPress developers.</p> <p>Two major issues being there&#8217;s not enough time to do it, and there&#8217;s a certain stigma that it becomes to <em>sales-y.  </em>Throughout my travels, I&#8217;ve noticed a lot developers that have successful products &#8212; still &#8212; are afraid to really build up the marketing arm of their business. Even when they <em>know</em> they need to do it, they become paralyzed to take action.</p> <p>Today I&#8217;m stoked to interview Tonya Mork, electrical engineer &amp; software engineer since the mid-80&#8217;s, experienced with managing multi-million dollar robotic projects, and now recently launching Know the Code membership site on today&#8217;s show.</p> <p>Hands down, this is one of my top shows of 2016. Tonya brings a wealth of knowledge and actionable advice that will inspire you to get out there and conquer your business &#8212; or at the very least &#8212; today&#8217;s to-do list.</p> <p><span id="more-6973"></span></p> <h3>Take action in your business with Tonya Mork</h3> <iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F273372955&visual=true&color=0066cc&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false"></iframe> <p>We wear many different hats as freelancers &amp; boutique agency owners.</p> <p>You might be developing and designing a website, but you also need to market yourself as the <strong>complete</strong> solution to continually attract customers. That is to say, you have no choice but to dive into <em>some</em> facet of marketing and promoting yourself, if you want to build a sustainable business.</p> <p>What&#8217;s the best way to do that?</p> <p><strong>Tell your story. Be different.</strong></p> <hr /> <p><em>It&#8217;s not about your framework or what your dev environment looks like, it&#8217;s what makes you &#8212; you.</em><br /><a href='https://twitter.com/share?text=It%27s+not+about+your+framework+or%C2%A0what+your+dev+environment+looks+like%2C+it%27s+what+makes+you+--+you.&#038;url=https://mattreport.com/marketing-wordpress-developer-tonya-mork/' target='_blank'>Click To Tweet</a></p> <hr /> <p>And guess what, it&#8217;s not which framework you use or what your dev environment looks like, it&#8217;s what makes you &#8212; you.</p> <p><em>Here&#8217;s an example:</em> At my <a href="http://slocumstudio.com">studio</a>, we&#8217;re just as capable as the next agency, but I don&#8217;t focus on that. I focus on the fact that we&#8217;re a family owned business with a small team, working out of the same office. That customer service comes before our development prowess, and that building a trusting long-term relationship is paramount to success.</p> <p>Oh, and we also get the job done.</p> <p>Sure, we sprinkle in our technical know-how and send over referrals, but I want customers to understand who we are and how we operate first and foremost as what sets us apart.</p> <p><strong>What makes you different?</strong></p> <p>Some might look at what I just mentioned as a weakness &#8212; and they very well could be to a variety of potential clients &#8212; but it works for us. It defines us and defines the vertical of clients we like to serve.</p> <p>So what about you? What chapter in your journey can you polish off and display to your would-be customers? Dig deep and find the uniqueness in you and your organization.</p> <p><strong>Get the eyeballs on your (membership) website that you deserve</strong></p> <p>All of this boils down to trust.</p> <p>As Tonya puts it in this interview, building trust is the first step to driving traffic. The more you can do for <em>other</em> people and serving them, the better you do at gaining that trust. Tell your story and take action &#8212; no one else is going to do it for you.</p> <p>It&#8217;s also just as important to focus on your customer&#8217;s story as well. Listen to their needs and be open to working with them at a new capacity. I know that systemizing and productizing are all the rage right now, but sadly, we can&#8217;t fit every project into the same template.</p> <p><b>The links</b></p> <ul> <li><a href="https://twitter.com/hellofromtonya">Tonya on Twitter</a></li> <li><a href="https://knowthecode.io/">Know the Code</a></li> <li><a href="https://wpdevelopersclub.com/">WP Developers Club</a></li> <li><a href="http://heropress.com/essays/finding-your-purpose-in-life/">Finding your purpose in life</a></li> <li><a href="https://mattreport.com/go/itunes">Like the show? Please rate us!</a></li> </ul> <p>&nbsp;</p> text/html 2016-07-09T06:28:43+01:00 http://abetterplanetwp.com A Better Planet Medium and WordPress — Draft Podcast https://poststatus.com/medium-wordpress-draft-podcast/ <p>Welcome to the Post Status <a href="https://poststatus.com/category/draft">Draft podcast</a>, which you can find <a href="https://itunes.apple.com/us/podcast/post-status-draft-wordpress/id976403008">on iTunes</a>, <a href="https://play.google.com/music/m/Ih5egfxskgcec4qadr3f4zfpzzm?t=Post_Status__Draft_WordPress_Podcast">Google Play</a>, <a href="http://www.stitcher.com/podcast/krogsgard/post-status-draft-wordpress-podcast">Stitcher</a>, and <a href="http://simplecast.fm/podcasts/1061/rss">via RSS</a> for your favorite podcatcher. Post Status Draft is hosted by Joe Hoyle &#8212; the CTO of Human Made &#8212; and Brian Krogsgard.</p> <p>In this episode, Joe and Brian talk about Medium &amp; WordPress and whether Medium and similar platforms are a significant threat to WordPress. They also discuss the benefits and challenges of open source platforms versus proprietary ones, and WordPress’s potential as a lower level item in the site stack.</p> <p><!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]--> <audio class="wp-audio-shortcode" id="audio-25489-1" preload="none" style="width: 100%; visibility: hidden;" controls="controls"><source type="audio/mpeg" src="https://audio.simplecast.com/41890.mp3?_=1" /><a href="https://audio.simplecast.com/41890.mp3">https://audio.simplecast.com/41890.mp3</a></audio><br /> <a href="http://audio.simplecast.com/41890.mp3">Direct Download</a></p> <h3>Links</h3> <ul> <li><a href="https://wordpress.tv/2016/06/25/matt-mullenweg-interview-and-qa/">Interview with Matt</a></li> <li><a href="http://wordpress.tv/2016/06/30/joe-hoyle-the-ultimate-rest-api-talk-part-1/">Joe&#8217;s REST API talk</a></li> <li><a href="https://github.com/joehoyle/vienna">Vienna WordPress app concept</a></li> <li><a href="https://ma.tt/2015/03/typewriter/">Billionaire&#8217;s Typewriter</a></li> <li><a href="https://markarms.com/2016/06/23/what-to-consider-when-the-platforms-show-up-with-money/">What to Consider When the Platforms Show up With Money</a></li> <li><a href="https://medium.com/">Medium.com</a></li> <li><a href="https://developer.wordpress.com/calypso/">WordPress.com Calypso</a></li> <li><a href="https://www.alleyinteractive.com/blog/how-medium-became-livejournal-for-publishers/">Medium compared to LiveJournal</a></li> </ul> <h3>Sponsor</h3> <p>This episode is sponsored by <a href="https://pippinsplugins.com/">Pippin&#8217;s Plugins.</a> If you want to sell downloads, setup content restriction, or start an affiliate program, Pippin’s Plugins have you covered. If you need all three, even better. Pippin’s Plugins is well known for making some of the best coded and most reliable plugins in the market. Check out <a href="https://pippinsplugins.com/">PippinsPlugins.com </a>for more information.</p> text/html 2016-07-07T22:53:13+01:00 http://abetterplanetwp.com A Better Planet Meet Orvis https://themeshaper.com/2016/07/07/meet-orvis/ A text/html 2016-06-30T23:01:26+01:00 http://abetterplanetwp.com A Better Planet BuddyPress 2.6.1.1 https://buddypress.org/2016/06/buddypress-2-6-1-1/ <p>BuddyPress 2.6.1.1 is now available. This is a maintenance release that fixes a bug introduced in 2.6.1. For more information, see <a href="https://buddypress.trac.wordpress.org/query?group=status&amp;milestone=2.6.1">the 2.6.1 milestone</a> on <a href="https://buddypress.trac.wordpress.org/">BuddyPress Trac</a>.</p> <p>Update to BuddyPress 2.6.1.1 today in your WordPress Dashboard, or by <a href="https://wordpress.org/plugins/buddypress/">downloading from the wordpress.org plugin repository</a>.</p> <p>Questions or comments? Check out <a href="https://codex.buddypress.org/releases/version-2-6-1-1/">2.6.1.1 changelog</a>, or stop by <a href="https://buddypress.org/support/">our support forums</a> or <a href="https://buddypress.trac.wordpress.org/">Trac</a>.</p> text/html 2016-06-14T18:48:34+01:00 http://abetterplanetwp.com A Better Planet Understanding the Motivators, Tactics and Impacts of Hackers http://wphunt.co/out?url=https%3A%2F%2Fwww.wpshrug.com%2Fblog%2Funderstanding-motivators-tactics-impacts-hackers%2F text/html 2016-06-14T09:48:49+01:00 http://abetterplanetwp.com A Better Planet Content scraper plugins, contract and copyright http://wpandlegalstuff.com/content-scraper-plugins-contract-and-copyright/ text/html 2016-06-05T07:19:14+01:00 http://abetterplanetwp.com A Better Planet Blogging Tools: DownThemAll Browser Add-on https://lorelle.wordpress.com/2016/06/04/blogging-tools-downthemall-browser-add-on/ text/html 2016-05-17T07:38:52+01:00 http://abetterplanetwp.com A Better Planet The monster that is a poor database schema https://pippinsplugins.com/resolving-poor-data-schema-designs/ <p>Step back in time two, three, four, or even 10 years and take a look at the development decisions you made then. What do you notice about them? Unless you are a one-in-a-million statistic, you probably look at those past decisions and say to yourself <em>what was I thinking?! Why did I do it that way?!</em> Welcome to the real world of actual development.</p> <p>As developers, we grow and learn over time; we get better at making design pattern decisions; we get better at writing performant code; we get better at <em>all</em> aspects of development.</p> <p>Take a look at any project that has been around for a number of years and you will find gremlins hiding in its shadows and crevices. There will be internal APIs that are convoluted; there will be data structures that make zero logical sense; there will be function names that seem asinine; there will be <em>blatant problems</em> and it will appear that these are the results of poorly made development decisions. While this is sometimes true, it is far more likely that these gremlins are actually the result of inexperience that leads to a lack of foresight and understanding of the future consequences of non-well-thought-out designs.</p> <h3>Smooth resolutions of bad design patterns</h3> <p>Imagine a project that begins as a small, internal system for doing <em>one</em> thing and only one thing, and imagine it as a project you build specifically for yourself. Due to the nature of it being a small, personal project, it is likely that you will take short cuts; it is likely you will make some decisions simply because Y provided a quicker solution than X; it is likely that you will name variables or API methods poorly; and it is guaranteed that you will make some decisions that have a severely negative impact on your small, personal project four years later when that project has grown far beyond a simple, personal project.</p> <p>This is the reality of the real development world and the truth for all projects that grow over time. Poor data schemas and difficult APIs are the skeletons in our closets, the spider webs behind our furniture, and the ghosts in our machines. They exist in every project and are a natural product of development growth.</p> <p>The real achievement is not in building a project with zero gremlins, it is learning how to get past those weaknesses and poor decisions in a smooth way that has little to no negative impact on the users of the project.</p> <p>Let&#8217;s go back to the imaginary project above for a moment. Assume that when first building that project you made the decision to store large amounts of data in a poorly designed database schema, or perhaps even a database with <em>zero</em> design schema that applies to your project. At the time this database schema worked fine because <em>it was easy</em> and, after all, it was only <em>you</em> using the project, so who really cares? Now fast-forward four years and imagine that your project is now used by over 50,000 websites and tens of thousands of users and hundreds or even thousands of developers. Each of these users makes use of the project in a slightly different way and each of the developers builds new tools on top of the project. At this point those poor design decisions (or perhaps even the complete lack of a &#8220;design&#8221; decision) begin to have negative effects on the project by reeling their ugly heads and presenting your users with severe limitations and scaling issues.</p> <p>Bad data schema designs can result in severe performance issues. Poor API design can make it difficult for other developers to use or extend the project. Poorly thought out relationships within your code and your database can become the elephant in the room that no one wants to talk about but are abundantly clear and really start to get in the way.</p> <p>The question that all developers need to ask at some point is this: <strong><em>how do we get past the design decisions of the past so we can continue to grow and excel in the future?</em></strong></p> <p>This is precisely what my team and I are working on for <a href="https://easydigitaldownloads.com" target="_blank">Easy Digital Downloads</a> now.</p> <h3>Quick and easy in the beginning</h3> <p>Four years ago, when Easy Digital Downloads was brand new, I made some poor design decisions related to the database structure used in the plugin. Relationships between various pieces of information stored by the plugin were created haphazardly and we chose to rely on the data structures provided by WordPress core. This means that all of our eCommerce data (payment records, order items, order meta data, customers, etc) were stored in the wp_posts and wp_postmeta table. At the time this worked fine. It was easy, quick, and more than flexible enough for what we needed. What I failed to see, however, was just how cumbersome storing eCommerce data in the core posts table was going to be once the plugin scaled up to a lot of users and large websites processing significant sales volumes.</p> <p>The decision to use wp_posts and wp_postmeta for our eCommerce data is a decision I regret and one that has created significant challenges for us, but none of the challenges are so significant that we cannot get past them.</p> <p>When faced with the reality of bad data schemas, there are really two ways to address the problem:</p> <ol> <li>Simply live it with and do what you can to mitigate the problems</li> <li>Work out a plan for resolving the problem completely by re-building the data schema from the ground up</li> </ol> <p>The first option is the easier of the two for many reasons. First, it requires the least amount of change. Second, it avoids the significant risk of severely breaking backwards compatibility. Third, it does not require any cooperation with third party developers that have built on top of your bad data schema.</p> <p>Option two, however, can be much better for the health of the project in the long run. It does, however, present a serious risk to the project&#8217;s health and continued adoption by users and developers. When making significant changes, backwards compatibility <em>must</em> be kept an absolute priority. If backwards compatibility is ignored or implemented poorly, it&#8217;s very possible that the migration process to the new and improved schema will go poorly, resulting in developers and users abandoning future reliance on the project. It can also cause a support nightmare if hundreds or thousands of websites are suddenly breaking due to the changes implemented.</p> <p>Building a backwards compatibility layer can be challenging, but it is a challenge that will be worth it in the end. Frankly, I would go as far as to say you should not even consider resolving a bad database schema if you do not plan to also introduce and maintain a complete backwards compatibility layer. Choosing to ignore backwards compatibility in a scenario like this is negligent and harmful to your users. With that in mind, how does one go about building a backwards compatibility layer? There are really a few parts of it.</p> <h3>Abstraction layers for backwards compatibility</h3> <p>The very first step in providing backwards compatibility is to ensure there is an <a href="https://en.wikipedia.org/wiki/Database_abstraction_layer" target="_blank">abstraction layer</a> for your database. An abstraction layer is simply an API for interacting with the database. It provides developers standardized methods for reading and writing to the database without writing actual queries. For example, <a href="https://codex.wordpress.org/Class_Reference/WP_Query" target="_blank">WP_Query</a> is an abstraction layer for the wp_posts table that provides methods for querying data from the posts database without writing any actual SQL. Why is this valuable? There are numerous reasons but for this particular discussion, it provides project maintainers the ability to change the database schema without disrupting external projects that utilize the data.</p> <p>In Easy Digital Downloads, we have built abstraction layers for <a href="https://github.com/easydigitaldownloads/easy-digital-downloads/blob/master/includes/payments/class-edd-payment.php" target="_blank">payments</a>, <a href="https://github.com/easydigitaldownloads/easy-digital-downloads/blob/master/includes/class-edd-customer.php" target="_blank">customers</a>, and <a href="https://github.com/easydigitaldownloads/easy-digital-downloads/blob/master/includes/class-edd-download.php" target="_blank">products</a>. These abstraction layers are fundamentally important when it comes time to change the underlying database structure.</p> <p>Let&#8217;s look at a quick example.</p> <p>Assume we wish to retrieve the first and last name of a customer record. In the current version of Easy Digital Downloads, both the first and last name are stored in a single column in the database, but perhaps in a future version we decide to separate them into two columns. Through the <a href="https://github.com/easydigitaldownloads/easy-digital-downloads/blob/master/includes/class-edd-customer.php" target="_blank">EDD_Customer</a> object, getting the name of the customer is simple:</p> <div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$customer</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> EDD_Customer<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">47</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$customer</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #339933;">;</span></pre></td></tr></table></div> <p>That will output the customer&#8217;s full name, such as <code>Elizabeth Johnston</code>.</p> <p>Where&#8217;s the value in this abstraction layer? well, it becomes very apparent (at a simple level) when we consider the following possibility.</p> <p>Assume now that the <em>EDD_Customer</em> object was not originally available so a third party developer decides to directly query the database for the customer&#8217;s name:</p> <div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_var</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;SELECT name FROM edd_customers where id = 47 LIMIT 1;&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div> <p>Since storing both the first and last name in a single column was probably a poor decision, we later on decide to separate the names into two columns, <em>first_name</em> and <em>last_name</em>. In this scenario, the first example, which relies on the abstraction layer of <em>EDD_Customer</em>, will continue to function exactly as is. The second example, however, will suddenly fail because the <em>name</em> column no longer exists.</p> <p>This is a simple example but it does accurately illustrate the importance of having abstraction layers. Consider now how important it will be when you&#8217;re preparing to change not only a single column in the database but the <em>entire</em> database. Every single column. Without a proper abstraction layer, making that transition will be nearly impossible.</p> <p>If an abstraction layer isn&#8217;t already present, <strong>build one immediately</strong>. That&#8217;s the very first step anytime a database schema needs to be changed.</p> <p>After you have an abstraction layer in place, you need to work hard to ensure that everyone uses it. If a platform has been around for a while, it will be necessary to <del>push and shove</del> work hard to encourage developers to update their code to use the abstraction layer. This is something we&#8217;ve begun to do for the recent <a href="https://easydigitaldownloads.com/development/2016/05/14/please-use-edd_payment/" target="_blank">introduction of EDD_Payment</a>.</p> <p>With the creation and adoption of a good abstraction layer, the process of migrating to a good database schema becomes a lot simpler, though it is still a very, very significant task that has a lot of challenges. For example: how does a project maintainer account for all of those developers that ignored or simply didn&#8217;t see the news about the abstraction layer? Or how about all of the project&#8217;s users that did not update to the latest versions? For those, the best one can do is provide as much backwards compatibility as possible.</p> <p>For Easy Digital Downloads, building a backwards compatibility layer will involve a number of factors. First, we will have to intercept and re-route every single call to <em><a href="https://developer.wordpress.org/reference/functions/get_post_meta/" target="_blank">get_post_meta()</a></em> that is made against all EDD payment metadata. Thankfully, the WordPress metadata API includes number filters and action hooks that make this possible. Second, we will have to intercept and re-route every query to the <em>wp_posts</em> table that contains the <a href="https://codex.wordpress.org/Post_Types" target="_blank"><em>edd_payment</em> post type.</a> Again, the prevalence of filters in the WordPress core codebase will provide ample ways for us to do this. Third, we will also have to intercept and re-route every write and deletion to the <em>wp_posts</em> and <em>wp_postmeta</em> tables for all EDD-related queries.</p> <h3>Slow and careful</h3> <p>This kind of migration process takes a long time and needs to be executed with extreme care. We will likely spend 6-12 months building this backwards compatibility layer. The most significant challenge for it will not be writing or handling the re-routing of queries; the real challenge will be finding and knowing all of the data points that we need to include. For example, we know very well what all of the meta_key values are that we use in Easy Digital Downloads and all of the officially maintained extensions. What we don&#8217;t know, however, is the meta_keys that third party developers have used in their own extension. There are some assumptions we can make, such as assuming that any meta_key containing &#8220;edd_&#8221; belongs an EDD plugin, but we&#8217;ll never be able to cover 100% of the data out there.</p> <p>In the end, there should be several goals in defeating the monster that is a bad database schema:</p> <ol> <li>Introduce a new and well thought-out schema that resolves all problems the original schema created</li> <li>Introduce and maintain complete abstraction layers for the database schemas so that future changes are less difficult</li> <li>Make the transition from old to new schemas as smooth and invisible as possible</li> <li>Protect the user base that does not have the luxury of updating or is simply unaware of updates by providing complete backwards compatibility</li> </ol> <p>There is no reason poor database schemas cannot be improved, they just have to be done so slowly and with great care.</p> <p><em>Note: would you like to learn how to build a database abstraction layer or read more about the reasons for why you should use custom tables in WordPress? I have a <a href="https://pippinsplugins.com/series/building-a-database-abstraction-layer/" target="_blank">complete tutorial series</a> on the subject.</em></p> text/html 2016-04-29T06:40:29+01:00 http://abetterplanetwp.com A Better Planet What the Queries https://kovshenin.com/2016/what-the-queries/ <p>I&#8217;ve never been a fan of IDEs, complex debugging tools with breakpoints, variable watch lists and all that fancy stuff. <code>var_dump()</code> and <code>print_r()</code> have always been my best friends.</p> <p>Recently I was playing around with the caching arguments in <code>WP_Query</code>, trying to combine that with <code>update_meta_cache()</code> while sticking <code>wp_suspend_cache_addition()</code> somewhere there in the middle, and it quickly became a mess, so I wanted to know what queries am I actually running under the hood.</p> <p>I came up with this little piece, which I think I&#8217;ll use more often from now on:</p> <pre>// Assuming SAVEQUERIES in set to true. $GLOBALS['wpdb']->queries = array(); // All the magic goes here var_dump( $GLOBALS['wpdb']->queries ); </pre> <p>This gives you a nice list of SQL queries that were triggered <strong>only</strong> by that magic code in between. Works great when you need a quick sanity check on all those caching arguments, priming meta or term caches, splitting queries and whatnot.</p> <p>Obviously it empties the initial set of queries, so anything in Debug Bar, Query Monitor, etc. will no longer be accurate.</p> <p>What&#8217;s your favorite way to keep track of queries?</p> <p><a href="https://kovshenin.com/2016/what-the-queries/?utm_source=feed&#038;utm_medium=click_here_to_comment&#038;utm_campaign=feed#comments">Click here to comment</a></p> <h3>More from Konstantin Kovshenin</h3> <ul> <li><a href="https://kovshenin.com/2015/wordcamp-russia-2015-recap/?utm_source=feed&#038;utm_medium=latest_posts&#038;utm_campaign=feed">WordCamp Russia 2015 Recap</a></a></li> <li><a href="https://kovshenin.com/2015/ctf-ota-2015/?utm_source=feed&#038;utm_medium=latest_posts&#038;utm_campaign=feed">Capture the Flag / OTA 2015</a></a></li> <li><a href="https://kovshenin.com/2014/color-options-vs-decisions/?utm_source=feed&#038;utm_medium=latest_posts&#038;utm_campaign=feed">Color Options vs. Decisions in WordPress Themes</a></a></li> <li><a href="https://kovshenin.com/2014/child-themes-import/?utm_source=feed&#038;utm_medium=latest_posts&#038;utm_campaign=feed">An Alternative to @import in WordPress Child Themes</a></a></li> <li><a href="https://kovshenin.com/2014/megafon-moscow-privacy-advertising/?utm_source=feed&#038;utm_medium=latest_posts&#038;utm_campaign=feed">MegaFon Moscow: Privacy &#038; Advertising</a></a></li> </ul> text/html 2015-12-30T03:16:41+01:00 http://abetterplanetwp.com A Better Planet Downsize your WordPress database by removing transients http://feedproxy.google.com/~r/Wprecipes/~3/sYtvpIfp_pw/downsize-your-database-by-removing-transients <p>First of it all, login to your phpmyadmin and choose your WordPress database. Once done, click on the sql button to open the sql command window.<br /> Then, simply paste the following sql command and execute it.</p> <pre> DELETE FROM `wp_options` WHERE `option_name` LIKE ('%\_transient\_%'); </pre> <p>Credit: <a href="http://stackoverflow.com/questions/10422574/can-i-remove-transients-in-the-wp-options-table-of-my-wordpress-install/11995022#11995022" target="blank">Stack Overflow</a></p> <p>Want more super useful SQL queries? <a href="http://www.catswhocode.com/blog/using-sql-to-manage-wordpress-the-definitive-guide" target="blank">Check out this article on Cats Who Code</a>.</p> <img src="http://feeds.feedburner.com/~r/Wprecipes/~4/sYtvpIfp_pw" height="1" width="1" alt=""/> text/html 2015-04-14T09:08:24+01:00 http://abetterplanetwp.com A Better Planet Tips for Hosting WordPress on Pantheon https://markjaquith.wordpress.com/2015/04/13/wordpress-on-pantheon/ A text/html 2015-01-07T22:23:01+01:00 http://abetterplanetwp.com A Better Planet Universal Typography with Tim Brown http://build.codepoet.com/2015/01/07/universal-typography-tim-brown/ A text/html http://abetterplanetwp.com A Better Planet How to Install and Set Up a New WordPress WooCommerce Theme http://code.tutsplus.com/tutorials/how-to-install-and-setup-a-new-wordpress-woocommerce-theme--cms-26846 text/html http://abetterplanetwp.com A Better Planet ManageWP Orion now shows vulnerable plugins on your websites https://managewp.org/articles/12963/managewp-orion-now-shows-vulnerable-plugins-on-your-websites