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();
}

There are other ways to go about destroying the meta box and rebuilding it manually. This, however, seems to be less invasive. It’s also a lot less code.

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.

However, there’s WP-CLI to help. Using WP-CLI, you can easily import your XML/WXR files. But when you do this, you may get this error:

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

Don’t worry, this is super easy to fix.

  1. Open your exported XML file that you are attempting to import.
  2. Find the line:
    <wp:wxr_version>1.2</wp:wxr_version>
  3. Change it to:
    <wp:wxr_version>1.1</wp:wxr_version>
  4. Import the file.

Problem solved, at least for me.

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 the same name. This can be especially important if you are using third party plugins. Continue reading Using PHP Classes and Functions in WordPress

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 would be able to pull up any profile and edit all of the fields. Here’s the solution I found. Continue reading Role Based Profile Fields in WordPress

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. Continue reading WordPress File Uploads Checked By MIME Type

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. Continue reading Customizing The WordPress Registration Form

The Reality of Ownership, The Dark Side of Social Media

Social Media is it’s own buzz word. It can ruin your reputation, or build it. In the business community, we talk about “owning” our companies social media. Here’s what we mean by that:

By taking personal ownership/accountability for posts, responses, and monitoring of our social media accounts, we make social media more effective and more personal to our base.

However, that’s not what this article is about. Continue reading The Reality of Ownership, The Dark Side of Social Media

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 the answers I needed in Google. I must not have been asking the right question or something. So here is what I learned. Continue reading Understanding the WordPress Quick Edit Custom Box