Categories
Web Development

Truncate a Phrase Using Words, Not Characters (PHP)

Often when people truncate text in their WordPress excerpts or sample text, they simply limit the total number of characters and add an ellipsis. It’s pretty easy to do, but it usually ends up with a word being broken at the end. For exampl… This function will truncate any phrase by the number of words […]

Categories
Web Development

The Easy Way to Remove the Popular Tab from a WordPress Taxonomy

Wow, that was a long title for this short article. First off, I am assuming that you know how to add JS scripts to your WordPress admin. If not, you need to know that first. So without further ado… if ($ === undefined) { $ = jQuery; } if ($(‘#custom_taxonomy_id-pop’).length) { $(‘#custom_taxonomy_id-pop’).remove(); $(‘#custom_taxonomy_id-tabs’).remove(); $(‘#custom_taxonomy_id-all’).show(); } […]

Categories
Web Development

SOLVED: This does not appear to be a WXR file, missing/invalid WXR version number.

Today I went to import a large number of posts from a live Wordpress site to a local copy of the site. We all know that the Wordpress Importer tool hasn’t had much love lately and is slightly broken. PHP will time time out you and drive you crazy if you try to use it.

Categories
Web Development

Using PHP Classes and Functions in WordPress

Creating custom functions in your WordPress template’s function.php file is a regular thing for many of us. What you might not know is how easy it is to wrap them in a class, or even why you would. Wrapping them in a class keeps them both organized and self-contained from other functions that may have […]

Categories
Web Development

Role Based Profile Fields in WordPress

I recently set out to customize WordPress profile fields for a specific role. You may want to have custom fields for users, but have different fields for different roles. For example, Authors may need some additional contact information, while Subscribers need only some basic fields. The concern I had was wether or not an Admin […]

Categories
Web Development

WordPress File Uploads Checked By MIME Type

Building a custom HTML form for WordPress is something I do fairly regularly. When adding an upload form, it’s important to check for allowed file types. You wouldn’t want anyone uploading a malicious PHP script, right? Wouldn’t it be great if WordPress did that for you? Of course it would.

Categories
Web Design Web Development

Customizing The WordPress Registration Form

Often times, people want a way to modify the look of the registration form page in Wordpress. However, this desired outcome is often misplaced. What most people want to do is simply place the form on a page, such as the home page or special registration page.

Categories
Web Strategy

The Reality of Ownership, The Dark Side of Social Media

The truth is, and always has been, that social media is not controlled by you. Those comments on Facebook do not belong to you. They belong to the social network. Those followers are not yours either. They belong to the network too.

Categories
Web Development

Understanding the WordPress Quick Edit Custom Box

Alright, I have to confess. This took me some time to wrap my head around. It also seemed like a lot of people were having the same problem. The question is “How do I add custom post meta fields to the quick edit function in WordPress?” For some reason, I had a hard time finding […]