Menu

Tarei King

WordPress developer, lover and enthusiast. Based in New Zealand, working Globally.

The Beginner’s Guide to Unit Testing: Building Testable Themes

In the first two articles in this series, we took a high-level look at what unit testing is and how to apply it in the context of plugin development.

Original Source
via IFTTT and Pocket.

An Introduction To Deploying WordPress with Mina

As a PHP application, WordPress is usually deployed by a very old method: uploading files via FTP. We have some deployment tools, but they often requires some type of Ruby skill. For example, one popular, powerful tool is Capistrano, but it’s also very heavy with many Ruby/Rails related features.

Original Source
via IFTTT and Pocket.

Stefan Kanev: Test-Driven Development And Refactoring

Stefan Kanev: Test-Driven Development And Refactoring

Original Source
via IFTTT and Pocket.

Loading Effects for Grid Items with CSS Animations

Today we’d like to share some loading effects for grid items with you. The idea is to show items in a grid with an animation once they are in the viewport. The possibilities are infinite and we’d like to give you some inspiration.

Original Source
via IFTTT and Pocket.

Using WP_TRIM_WORDS on the_title in WordPress

Straight from the WP Codex there is a command to trim the word count on text – commonly used for controlling the_excerpt length to customise ‘read more’ and ‘introduction’ type on a page. $trimmed = wp_trim_words( $text, $num_words = 55, $more = null );

The above example will trim a $text variable to 55 words and have nothing trailing.

Tip for new comers: Using wp_trim_words() on the_title returns an array and not a string, so it doesn’t work with.

Instead you are likely looking for:

echo wp_trim_words( get_the_title(), 55, null );