The Power of the Body Class in WordPress

For many WordPress users who are stepping beyond the basics of WordPress and starting to customize different parts of a site based on the site's template hierarchy, it can get pretty daunting to figure out WHICH page template is being used to render WHICH part.  The heart of this answer is in understanding more about WordPress template hierarchy. There is even a very useful visual map to help find your way to the right template.

What New Features are in WordPress 4.8?

The core developers of WordPress have laid out a release timeline for the upcoming WordPress 4.8 version.  The goal is to have the next version of WordPress released before the upcoming WordCamp Europe, that takes place in the middle of June.  June 8th is the targeted release date for WordPress 4.8.

Note: You can start playing around with pre-releases and beta versions on a test site right now using the Beta Tester WordPress plugin.

This Friday is also the start of the beta versions, so after this Friday there "should" be no more new features added to the 4.8 version.  So, let's look at a few of the features that have a good chance at getting included in this next version of WordPress.

Using SparkPost with SMTP Studio

There are many solutions for offloading your website's transactional emails (password reset, new user registration, form submission, etc.) to a standalone SMTP service.  While there are many valid reasons to use this system (protects your hosting IP address, eliminates server resources needed to handle email, etc.) there are still many site owners who don't take this next step.  In this post, we will walk through the step-by-step process of setting up SparkPost with the SMTP Studio plugin.

Note: We have already talked about setting up MailGun and Amazon SES to perform the same transactional email SMTP tasks. SparkPost is simply another service option.

First, why use SparkPost?  SparkPost is simple to setup. It also offers plenty of emails per month (100,000) at the free account level and has a wide variety of additional features and services that can be added to an account.

5 Ways to Regain Balance When Life Goes Upside Down

When our world is spinning, seemingly out of control, freelancers can many times struggle to regain our footing.  Nuno Bettencourt and Gary Cherone, from the band Extreme, used to sing "Stop the World, I Want to Get Off" as if the world was a merry-go-round and if we could just "disconnect" and "get off the ride" we could regain our footing.  But as a freelancer, we may not be able to get off since we have to find a way to put food on our table or pay our rent/mortgage.

During these times of turbulence, feeling completely drained from balancing work, family, and friends, we must remember that we are all human BE-ings and not human DO-ings.  A friend of mine told me that "purpose becomes lost when we only focus on doing without being."  So in times of stress and struggle, I would encourage you to consider a few of these steps to help regain your footing and balance.

Understanding the Current 'Password Reset' Vulnerability Exposed in WordPress

A large percentage of site owners use WordPress to power their sites.  One of the side benefits of this aspect is that security researchers/testers spend quite a bit of time looking for exploits and vulnerabilities in WordPress.  Most of the times, when a vulnerability is discovered, it is patched relatively quickly, and the WordPress update fixes that vulnerability.  But there are occasions when groups differ on the level of vulnerability of a discovered exploit.  This is what has happened recently.  The summary is:

  • Dawid Golunski discovered a method of resetting an Administrator's WordPress password through a 'password reset' email exploit.
  • The Core WordPress Security team didn't feel it was a priority at that moment.
  • The exploit has now been made public.
  • A patch/fix is now in the process of being released.

Eliminating the JUMP from WordPress Read More Link

WordPress has a method of splitting your content to only show the "top half" on the is_home() conditional location.  (This is normally the "Blog" feed page in WordPress.  It could be your homepage, or it could be a custom page depending on your theme and setup.)  This "splitting method" is called the "Read More" link.

The "Read More" link is identified as <!--more-->  in the code/content area of your WordPress post/page.  The location in your post content that contains this "Read More" link will return an active link from the blog feed to the full post page.  What happens next when a reader clicks on the "Read More" link presents the "issue" that WordPress owners experience.

Taking Control of the WordPress Auto Paragraph Tag

WordPress has a function called wpautop() that very kindly "autowraps" and adds paragraph tags (<p></p>) around elements of your content.  While this is extremely helpful for users, those that may be more unfamiliar with HTML and those that only want to use WordPress as a content publishing platform.  Those users that desire more control over the structure of the site may want to manage what elements exist or don't exist in the content structure.

For a long time, WordPress users have had access to filtering out the wpautop() function by adding a simple line of code to their functions.php file of their active theme folder.

remove_filter( 'the_content', 'wpautop' );

But the above code can also leave users with an unintended issue.  This code snippet will remove ALL the auto-inserted paragraph tags.  To truly have control over when and where this wpautop() function interacts with content, we need to be able to manage this on an individual post/page level.

WordPress 4.7.4 Released

WordPress 4.7.4 has now been released and you should make sure all of your sites are updated.  This release is a maintenance release and contains 47 bug fixes and enhancements.  The prior incompatibility between upcoming Chrome versions and the visual editor of WordPress have now been fixed.  Along with better media handling and improvements in the REST API.

Using CSS Columns for Better Content Layout

Have you ever been browsing a website and wonder... how did they do that?  This is one of the things that are asked a lot in the WPStudio membership.  This past week one of our members was on a British news site and asked if the section displayed in the image below could be done in CSS?

There are three CSS properties that allow developer to take a straight block of code and allow it to display like the above image.

  • column-count -  this property specifies the number of columns an element should be divided into.  By setting this property with a number, CSS will auto-divide the element (unless additional properties like column-width are declared).
  • column-gap - this property specifies the gap (spacing) between the columns.
  • column-rule - this property can set the width, style, and color of the rule (line) that appears between the columns (in the gap).
    • width - Options include: medium, thin, thick, and length (pixel width etc)
    • style - Options include: none, hidden, dotted, dashed, solid, double, groove, ridge, inset, outset.
    • color - Options include any CSS color value.

Now let us look at a piece of example CSS that would be applied to the "content" area to make any wrapped code layout like the above screenshot image.