dev

FacebookTwitter

Create WordPress Shortcodes

http://davidwalsh.name/wordpress-shortcodes WordPress shortcodes are super handy, especially when handing off a WordPress-based website to a client. The alternative to using shortcodes is creating complicated templates, and even then, you cannot adequately replace what shortcodes can do. I recently needed to implement a new shortcode for the Mozilla Hacks blog and was happy to learn how simple the WordPress API makes creating new shortcodes! Let me show you how to create your own WordPress shortcodes!
widgets

taxonomy and custom post

Do-It-Yourself Caching Methods With WordPress

http://wp.smashingmagazine.com/2012/06/26/diy-caching-methods-wordpress/ There are different ways to make your website faster: specialized plugins to cache entire rendered HTML pages, plugins to cache all SQL queries and data objects, plugins to minimize JavaScript and CSS files and even some server-side solutions. But even if you use such plugins, using internal caching methods for objects and database results is a good development practice, so that your plugin doesn’t depend on which cache plugins the end user has. Your plugin needs to be fast on its own, not depending on other plugins to do the dirty work. And if you think you need to write your own cache handling code, you are wrong. WordPress comes with everything you need to quickly implement varying degrees of data caching. Just identify the parts of your code to benefit from optimization, and choose a type of caching.
http://wp.smashingmagazine.com/2011/10/07/definitive-guide-wordpress-hooks/

WordPress Essentials: The Definitive Guide To WordPress Hooks

If you’re into WordPress development, you can’t ignore hooks for long before you have to delve into them head on. Modifying WordPress core files is a big no-no, so whenever you want to change existing functionality or create new functionality, you will have to turn to hooks. In this article, I would like to dispel some of the confusion around hooks, because not only are they the way to code in WordPress, but they also teach us a great design pattern for development in general.
What seems like one of the most complicated bits of functionality in WordPress is adding meta boxes to the post editing screen. This complexity only grows as more and more tutorials are written on the process with weird loops and arrays. Even meta box “frameworks” have been developed. I’ll let you in on a little secret though: it’s not that complicated. Creating custom meta boxes is extremely simple, at least it is once you’ve created your first one using the tools baked into WordPress’ core code.

How To Create Custom Post Meta Boxes In WordPress

http://wp.smashingmagazine.com/2011/10/04/create-custom-post-meta-boxes-wordpress/
http://wp.smashingmagazine.com/2011/09/30/how-to-create-a-wordpress-plugin/ WordPress plugins are PHP scripts that alter your website. The changes could be anything from the simplest tweak in the header to a more drastic makeover (such as changing how log-ins work, triggering emails to be sent, and much more). Whereas themes modify the look of your website, plugins change how it functions. With plugins, you can create custom post types, add new tables to your database to track popular articles, automatically link your contents folder to a “ CDN ” server such as Amazon S3… you get the picture. Theme Or Plugin? If you’ve ever played around with a theme, you’ll know it has a functions.php file, which gives you a lot of power and enables you to build plugin-like functionality into your theme.

WordPress Essentials: How To Create A WordPress Plugin - Smashing WordPress

http://wp.smashingmagazine.com/2011/09/28/developing-wordpress-locally-with-mamp/

Developing WordPress Locally With MAMP - Smashing WordPress

Local development refers to the process of building a website or Web application from the comfort of a virtual server, and not needing to be connected to the Internet in order to run PHP and MySQL or even to test a contact form. One of the most annoying parts of development, at least for me, is the constant cycle of edit, save, upload and refresh, which, depending on bandwidth and traffic, can turn a menial task into a nightmare. With application platforms such as WordPress, which require a server back end to work, you would normally be constrained to develop on a live server, with the headaches that go along with that. MAMP and its Windows counterpart, WAMP , are tools that allow you to locally develop applications that require a server on the back end.
http://wp.smashingmagazine.com/2011/09/21/interacting-with-the-wordpress-database/

WordPress Essentials: Interacting With The WordPress Database - Smashing WordPress

While you already use many functions in WordPress to communicate with the database, there is an easy and safe way to do this directly, using the $wpdb class. Built on the great ezSQL class by Justin Vincent, $wpdb enables you to address queries to any table in your database, and it also helps you handle the returned data. Because this functionality is built into WordPress, there is no need to open a separate database connection (in which case, you would be duplicating code), and there is no need to perform hacks such as modifying a result set after it has been queried. The $wpdb class modularizes and automates a lot of database-related tasks. In this article, I will show you how to get started with the $wpdb class, how to retrieve data from your WordPress database and how to run more advanced queries that update or delete something in the database.