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 ›

The Best Freebies for Designers (May 2013)

Published a little bit later than expected, here are the best freebies for designers from last month (May). We have free GUI templates, icon sets, fonts, Photoshop actions, PSD templates, textures… and everything else inbetween.

Read more ›

Give Clients the Power to Self-Manage and Update Their WordPress Sites

Self Service

To developers, the WordPress admin interface is really simple and intuitive, particularly considering the amount of trouble we go through to make things behave like they should.

I found out a lot of clients that were excited about having their own self-powered CMS, freaked out when trying to change a piece of content or simply weren’t using it at all. It still wasn’t easy or intuitive enough.

Now imagine having a single place where your client can edit exactly what he needs: a couple of testimonials, update their logo or favicon, changing the copyright footer text, managing the slideshow on the homepage or give them some textareas where to insert their ads.

Read more ›

WordPress Code Generators For Developers

Add GenerateWP to your WordPress development toolbox. There are many common WordPress development tasks which require large blocks of code. Oftentimes these are too long to commit to memory and you find yourself looking up a tutorial or sifting through the codex to find the right code. That’s when a code generator can come in handy.

Read more ›

Free Ebooks for Designers and Developers

books

There are literally thousands of books available for web designers and developers online. There has been no language, no point of discussion, or no trend that has not, at one time or another, been extensively explored and analysed, and eventually published into a book.If you do a simple web search on any web topic, you will find a book, if not a multitude of books, that has been competently written on that particular subject. Of course, you will have to pay for these books.

Today we have a selection of ebooks for you covering most aspects of web design and development. And the best thing about these books is that they are all FREE!

Read more ›

How To Add a 2nd Meta Box for a Different Featured Image

In this tutorial, you’ll learn how to create a custom field with meta box using the Advanced Custom Fields plugin. This is one of the best ways to add a second featured image or post thumbnail in WordPress.

Using a theme framework like Genesis enables you to display the second image in any hook location.

Read more ›

The WordPress Coding Standards: Naming Conventions and Function Arguments

In this series, we’re taking a deep dive into the WordPress Coding Standards – specifically, the PHP coding standards – in order to evangelize and understand how quality WordPress code should be written.

Despite the fact that this is documented within the WordPress Developer Handbook, I think there’s something to be said for understanding the rationale behind why some things are the way that they are.

Remember: Our ultimate goal is to make sure that we’re writing code that conforms to the coding standards so that we, along with other developers, are able to more easily read, understand, and maintain code for themes, plugins, and applications built on top of WordPress.

Read more ›

How To Add A Second Style Sheet In Your Theme

css

In this tutorial, i’ll show you how to create and add a second style.css file in your theme. You can add the style sheet to your parent theme however its best practice to add it in your child theme. You can also use the second style sheet to style multiple pages or posts by adding a conditional tag to the code.

If you’re planning on making big changes to one or more pages on your site, which is different to the main style.css file, this is a good option.

Read more ›

How to use WordPress shortcodes in theme files

WordPress shortcodes are very useful and easy to use. But unfortunately, you can only shortcodes in post/page editor, not theme files. But there’s a little trick to do it easily. Just read on!

To use a shortcode in a theme file, simply use the do_shortcode() function as shown below;

Read more ›