Category: Development

Plugin Development 101 – Separating Your Plugin into Multiple Files | Pippins Plugins

In part 3 we discussed the general best practice of separating your plugin out into multiple files. Today we’re going to look at how you actually do that and also go into more depth about why this is a good practice that you should be adopting for all of your plugins once they begin to become even remotely complex.

Read more ›

The WordPress Coding Standards: The Ternary Operator and Yoda Conditions

In this particular article, I thought we’d take it a bit easier before jumping into the final topic. As such, we’re going to cover two really simple topics (that are often either ignored or overcomplicated).

Specifically, we’re going to talk about the ternary operator and we’re going to talk about Yoda conditions.

When it comes to writing WordPress-based code, the Coding Standards strictly say that we should aim for readability first.

Read more ›

GenerateWP.com – Useful WordPress Code Generators

Who doesn’t love a good code generator for WordPress? GenerateWP.com should definitely be added to your list of bookmarked resources as the site provides a number of different generators for common tasks such as WP-Config file, sidebars, custom post types, menus, and more. Best of all, the code generated from this website meets the WordPress coding standards. Rami Yushuvaev did a great job with the site. I’m curious to know how many of you have used the code generated by his website in your own projects or do you mostly write your own code from scratch? What other types of WordPress generators would you find useful?

Read more ›

How To Remove Comment Form Allowed Tags

HTML5

One of the first things I noticed when converting my Genesis child theme from XHTML to HTML 5 was the changes to the comment form. By default, WordPress includes comment form allowed tags in the source code.

The problem I have found with these tags is that they can attract spam comments which include HTML links.

This may have something to do with the fact the source code for the comments form includes code which can be easily scanned by link posting spam bots.

Read more ›

Storing Session Data in WordPress without $_SESSION

Cookie

The term Session in web development refers to a general method of storing semi-permanent data, such as user logins, user interactions, ecommerce shopping carts, and many other examples. PHP has a system called $_SESSION, which is exceptionally simple to use, but has same major draw backs, including security issues, and intermittent support across server environments. A few months ago, Eric Mann introduced WP_Session; a new library that provides a session data storage system that has the simplicity of $_SESSIONs but without many of the drawbacks.

Read more ›

Your WordPress Skills Can Change The World

You’re a talented WordPress developer or designer. Let’s be honest, you’re pretty popular these days. You’ve got skills that are needed far and wide. The only question is: How will you use them?

How about saving the world? I’m only kind of overstating it. The fact is, thousands of nonprofits are tackling our country’s biggest challenges and doing incredible work to improve their communities. But…they have few resources at their disposal.

At Taproot Foundation, we engage the nation’s professionals to use their talents pro bono to support organizations like these that are focused on social change. The number one request we get from nonprofits is for pro bono support to build a new website.

Read more ›

How to Create Super Cool WordPress Category Pages

How important are the category pages on your site? Are they just an afterthought? Are they drab and lackluster? Admit it — could they be a lot more valuable (to both you and your visitors)? Couldn’t they be a lot cooler too, like this guy below?

If you’re like most people, then your category pages are probably in the exact same condition they were in on the day you started your site. More than likely they’re just a list of links to your posts with either an excerpt or the full post showing.

Maybe they looks something like this category page using the default Twenty Twelve theme.

But what if you took more care with your category pages? What if you made them more like introductions to the subject at hand — i.e. the topic of your category?

Instead of the default list of links, what if you had a category page that looked like this?

Read more ›

The WordPress Coding Standards: Single Quotes and Double Quotes

In this series, we’re taking a look at the WordPress PHP Coding Standards in order further understand how quality WordPress code should be written.

Sure, all of this is documented in the WordPress Coding Standards and it’s a site that every WordPress developer should have bookmarked and on hand when working on a theme, a plugin, or an application; however, if you’re just getting into WordPress development, then it’s important to understand the rationale as to why the conventions are the way they are.

In this article, we’re going to be taking a look at the use of single quotes and double quotes specifically when dealing with strings.

Read more ›

Add A Featured Image From A URL

Sometimes you need to dynamically add a featured image to a post or a custom post type from another server than the one your WordPress install is running. And you’re facing a common issue: how to do it?

Of course in this case, you need to grab the featured image from the second server, download it to your own server, in the upload folder, and assign it to the correct post. In the first step we are going to create a new post dynamically, and then we’ll deal with the featured image.

Read more ›

Resources For Learning Git

GIT

Git is an extremely powerful and sophisticated system for distributed version control. Apart from offering a novel approach to source code management, Git offers a great deal of features. Sadly, learning how to use Git can be confusing for anyone, not just beginners. As a result, in this roundup, we have collected some of the best resources for learning Git to help you initially get started with Git, and then, eventually mastering it.

If you are looking for a quick resource to help you get started with Git, this one by Roger Dudler will prove really useful to you. It will help you setup Git as well as give you the ability to experiment with it. Definitely worth checking out!

Read more ›