WordPress 4.8.2 Security/Maintenance Release Available

WordPress 4.8.2 is a security and maintenance release that should be applied immediately.

Things to note

WordPress versions 4.8.1 and earlier are affected by nine security vulnerabilities that are addressed in the 4.8.2 version update. Along with the security updates – there are multiple maintenance fixes to this new version as well. You can read more by looking at the release notes: https://codex.wordpress.org/Version_4.8.2

If you have not done so already – download the update or simply use your existing installation of WordPress to update your site. Either way – this is an excellent time to make a backup copy of your site(s) before upgrading.

WordPress 4.7.5 Security Release Available

WordPress 4.7.5 is a security release and should be applied immediately.

Things to note

All earlier versions of WordPress are affected by multiple security issues and we suggest you update your current site to this version. This version also includes 3 maintenance fixes to the 4.7 release series. You can read more by looking at the release notes: https://codex.wordpress.org/Version_4.7.5

If you have not done so already – download the update or simply use your existing installation of WordPress to update your site. Either way – this is an excellent time to make a backup copy of your site(s) before upgrading.

WordPress 4.7 Update Now Available

WordPress 4.7 makes WordPress easier to customize the way you want it.

Things to note

  • New Twenty Seventeen theme
  • Customizer allows you to set up your theme easier in the initial set up as well as allows you to easily preview changes without actually making the changes to the site until you are happy with what you see.
  • Themes can now provide starter contact to get you up and ready faster.
  • Header background video now are available
  • Creating menus/adding custom CSS is now easier.
  • PDF thumbnails allow you to quickly view your documents in the media library
  • Creating menus/adding custom CSS is now easier.
  • Users can now choose their own language of the dashboard
  • Long awaited – we now have the WP REST API built into WordPress 4.7
  • All sort of great functionality for developers as well including new functions, hooks, post type templates, etc

If you have not done so already – download the update or simply use your existing installation of WordPress to update your site. Either way – this is an excellent time to make a backup copy of your site(s) before upgrading.

As always, a big thanks to all the contributors for their time and attention to the new features/fixes!

HOWTO: Add TinyMCE to a Textarea in WordPress

If you are building a plugin or simply adding some custom fields for your theme and would like to use the WordPress Visual/HTML editor – you can – with one easy line of code:

<?php wp_editor( $content, $editor_id, $settings = array() ); ?>

No extra added JS or anything else is needed! It is that simple. (This was introduced with WordPress 3.3)

Used in a real world example (custom fields for a custom post type):

<?php wp_editor( $sdac_profile_general_description, 'sdac_profile_general_description' );?>

That outputs a text area with the name “sdac_profile_general_description” and the value of the custom field.

I hope this helps out next time you find yourself wanting the Visual/HTML editor in place but struggling to get all the needed JS/HTML in place.

Further Documentation: http://codex.wordpress.org/Function_Reference/wp_editor

Easily Add Page Excerpts in WordPress

Ever need to add an excerpt field for WordPress when working with pages? There is an easy, one line way to do this (no plugin needed). Simply add this to your theme’s functions.php file:

add_post_type_support( 'page', 'excerpt' );

Once you have that in place – you can then use the WordPress the_excerpt() function to show the excerpt within the theme.

WordPress 3.2 is Available

WordPress 3.2 has officially been released. The update contains a number of changes making WordPress faster with a refreshed backend user interface. You can read more about all the changes and updates that went into 3.2 if you are interested. You can also see all the specific changes/fixes as well.

Download the latest versions of WordPress: WordPress 3.2

Using meta_query With WordPress 3.1+

With WordPress 3.1 – we now have the ability to use “meta_query” to show posts associated with a certain custom field. I recently used this in order to create an events listing widget for a client. I needed to query posts in the “Events” category and that had a time stamp defined (which happened to be the start date of the event). The client wanted to show only current/future events (today or later) and wanted to show them in order by the closest event date to the furthest away.

Getting the general query together was a snap – but the orderby did not work unless I had the meta_key defined (this is documented but was overlooked initially).

Example

$now = time();
$args = array(
	'category_name' =&gt; 'Events',
	'meta_query' =&gt; array(
		array(
			'key' =&gt; 'sdac_event_time_stamp',
			'value' =&gt; $now,
			'compare' =&gt; '&gt;=',
			'type' =&gt; 'NUMERIC'
		)
	),
	'meta_key' =&gt; 'sdac_event_time_stamp',
	'order' =&gt; 'ASC',
	'orderby' =&gt; 'meta_value_num'
 );
$events_query = new WP_Query( $args); 

If you take a look at the query itself – the trick was to capture the time now ($now) and then use the compare within the meta_query. Overall – this sort of query makes working with custom fields a lot easier. If you have not checked it out yet – take a look.

Documentation
Function Reference/WP Query

WordPress Taxonomy Query (Keep it Simple)

Now that a number of people are using more and more custom taxonomies for WordPress – custom taxonomy queries are something becoming necessary.

Example: You have a WordPress site set up to show/sell products (in this example – you sell books and posters). You have a custom taxonomy called “catalog” that you use to organize all the products.

If you want to show all items that are marked “posters” in your custom catalog taxonomy you can simply use this query:

query_posts( array( 'catalog' =&gt; 'posters' ) ); 

Of course – you can create more complicated custom taxonomy queries, but this will get you started. By using custom taxonomies (and custom post types) – you can really open the door to creating complex content management systems (and/or really cool sites that need something more than your standard categories/tags/posts/pages).

Further documentation: http://codex.wordpress.org/Function_Reference/query_posts

Remember – keep it simple!

Custom Post Types Open the Door…

For the last five projects we have been working on – we have used Custom Post Types for all of them. While we first thought these were pretty cool to work with – we have since realized that these are amazing. We have implemented user submitted media, events, profiles, vendors, contributors, etc all using Custom Post Types. Since we would like to share the love…we are looking to make some really awesome plugins for the community. Anyone have something they think would be really cool and that would help a lot of people?

More Fun with WordPress Screen Options

Unlock the power of screen options

After taking a look at “Screen Options” on the WordPress menus page (Appearance > Menus) – I decided to spend some time going through the different “Screen Options” on each admin page view and would highly recommend you doing the same. This very useful tab allows you to:

  • Choose what you see on the dashboard (and how it is displayed)
  • Show/hide fields on the edit post page
  • Choose the number of posts/pages/categories/tags/plugins/users you see in those listings (great if you want to show more than the default number)
  • Show/hide columns in the posts/pages/categories/tags/plugins/users listings
  • Enable/disable accessibility mode (Appearance > Widgets)
  • Show/hide different options in WordPress menus (like mentioned in the previous post)

If you plan to spend a lot of time in the backend of WordPress – do yourself a favor and get familiar with these options as you will at some point find something useful about those options.