How to Redirect Known Pages and Wildcard for Everything Else with htaccess

I recently worked on a project which needed me to shut down a WordPress blog and migrate it’s content. I had about 20 posts and pages that were going to migrate but everything else was going to be deleted. Since htaccess runs their commands from the top to the bottom, place your known redirects above… Read more »

Continue Reading

Category: Code Snippets

Restrict Certain File Mime Types in WordPress

I recently heard from a client saying their blog was loading very slowly. The issue was caused from a high resolution image in .tiff format which is generally used for print. In order to block these file types add the following plugin to your mu-plugins folder. Source

save as restrict-upload-types.php and upload to your… Read more »

Continue Reading

Category: Common Questions

Check Page Level Depth If Condition in WordPress

The code snippet below is handy when you are trying to check if the current page is a parent or a child in a WordPress theme. You can then use the conditional to output different code depending on the page depth it is

Source: Get the depth of the current page in WordPress

Continue Reading

Category: Code Snippets

Hide WordPress Content Editor Panel Using ACF

Add the code snippet below into your functions.php file to hide the default WordPress content meta box. Source

Continue Reading

Category: Code Snippets

Yoast Breadcrumbs CSS Styles for WordPress Templates

The Yoast SEO plugin is great and offers a nice breadcrumbs snippet. Unfortunately, there is not an easy way to add a wrapper ID or class to the breadcrumbs for styling. Follow the steps below to change that.

Continue Reading

Category: Code Snippets