Search for Orphaned Post Meta Data

Here is a SQL statement that allows you to search the database for orphaned post meta data. So it looks for any meta data that no longer has a corresponding post in the posts table. SELECT pm.meta_id, pm.post_id FROM wp_postmeta as pm LEFT JOIN wp_posts as p ON...

Remove Video Download Link in Divi Video Box

So there are times where you want to try to protect the video on a page. Here is the jQuery that you should use. <script> jQuery(document).ready(function() { if (jQuery(‘.et_pb_video_box').length !== 0) {...

Additional Security Headers

There are always people that are interested in running things as secure as possible. You should need to place this code into a file within the mu-plugins directory to ensure it gets fired as early as possible when loading the front end of the website. I have been able...

Getting dynamic data into JavaScript using Ajax

So there are often times you would like to have settings in the WordPress dashboard but use the data in a js file. I found that this can easily be done using a jQuery.post call to a WordPress Ajax url. /* Javascript file */ var site_url = ”; jQuery( document...

Adding a after_body Action to WordPress

So there are times that you would like to be able to add code directly after the body tag of a site.  WordPress unfortunately does not have this capability built into it.  So by modifying the the header.php file of your child theme you can easily give you the ability...