Advanced Custom Fields — Update a Group Sub Field From Within a Flexible Content Field

 

 

Moving a site from Drupal to WordPress

Moving a site from Drupal to WordPress

Exporting from Drupal Use Views Data Export module and these instructions. When exporting tags there’s a couple options. 1. You can have all the added tags in one field value. 2. You can export each taxonomy individually. Depending on how you want the tags within the WP site you may prefer one way or another. … Continued

WordPress Admin Taxonomy Sidebar Resize

Taxonomy sidebar

I’m currently setting up an admin for a clients redesign. There’s going to be a hefty amount of categories and I wanted to make the selector in the sidebar resizable for at least a little bit easier viewing. The simple if not completely cross browser friendly (chrome, ff, safari) way to do this is css’s … Continued

Add Special Chars to WordPress TinyMCE Char Map

Had an issue where a clients blog post had one of these in the post and it wasn’t being displayed right. The real issue was changing the ‘post_content’ field of the wp_posts table to UTF-8 Unicode (utf8mb4) from cp1252 West European, but (!) along the way I tried this. Put this in a plugin or functions.php and … Continued

Add browser and device name to WordPress body class

Github Gist

 

Do not ever use the guid element for creating links – ever – ever

I was recently (I always seem to start posts with that phrase) learning how to update a clients posts post_title, slug (aka post_name in the db) and guid when a post title was changed programatically. I was using get_sample_permalink() in combination with wp_update_post() to generate a permalink and update the post guid along with the … Continued

Force Post Author Comments to Moderation in WordPress

By default in WordPress when an author of a post comments on their own posting the comment is automatically approved. This makes sense when authors are associated with the site, have access to admin, etc. There are cases where content from the general public is used to create posts and while the user is logged … Continued

Allow html in Contact Form 7 error messages

Contact Form 7 has a filter where one can alter the messages being sent back to the browser called wpcf7_validation_error. A simple htmlspecialchars_decode altering the $message variable before returning will do the trick. This function will run on any error for any form you have in your site (any CF7 form that is). If you … Continued

Jetpack 404 not found: devicepx.js

Jetpack 404 not found: devicepx.js

While setting up this site I noticed some files not found errors in dev console. One was devicepx.js which was in the jetpack modules path. It’s used to optionally load retina/HiDPI versions of files. I believe it would be for gravatars and since this site doesn’t use gravatars I deemed it unnecessary. The above code … Continued

Earliest WordPress Hook Where Global $post Variable Exists

In the file wp-includes/class-wp.php there is a hook run which is simply named 'wp'. This, as far as I can tell, seems to be the earliest hook in which the $post object variable exists. The hook is passed the &$this object which the comments state: references the WP object. It allows for accessing the properties … Continued