Blog

Tips, tricks, and other valuable WordPress and web technology knowledge to save you time and make you money!

Blog

Access Multiple WordPress Global Variables

If you want to access multiple WordPress global variables in a function, you need to separate them by commas. So, in the function below, we want to access both the wp_version and required_php_version variables. In order to do that, we simply have to separate them by commas. See the example below: public function example_function(){ global…

Get WordPress Version with PHP

We needed to get the WordPress version with PHP code and we found a global WordPress variable that you can use to access that. All of WordPress’ global variables can be found at https://codex.wordpress.org/Global_Variables. In order to access the current WordPress version, you need to add the following to your function: global $wp_version; Then, you…

Create MailChimp Campaign

Learn how to create a MailChimp campaign in 4 easy steps. We’ll describe what the terminology means and how to start sending out newsletters to your audience. Step 1: Sign up for MailChimp Sign up for MailChimp at https://mailchimp.com/signup/ Step 2: Create List Now that you have an account and are logged into your MailChimp…

Get and Set Data Attributes with Javascript

We’re very familiar with getting or setting data attributes with jQuery but we had to do a little research to figure out how to get and set data attributes with Javascript. The code below show how to get and set data attributes on an HTML element with Javascript. The HTML Element <a href=”#” class=”modal” data-modal-id=”modal_25″…

Add Scripts/Styles to Specific WordPress Admin Pages

We ran across an issue while creating a WordPress plugin. We needed a CSS stylesheet and a JS file to be included on a WordPress plugin Settings page but not on any other WordPress Admin page. In order to do this, we had to tap into the admin_print_styles- action. You need to add the page’s…

Customize Facebook and Twitter Share Image, Description, and Title

Customizing the image, description, and title that appears when you share a link to Facebook or Twitter is technical and tricky if you don’t know what to do but it’s actually incredibly easy if you have a WordPress website. We’ll show you the 3 simple steps that you need to take to customize Facebook and…

OrderBy All Laravel

I tried running the following code and unfortunately, it throws an undefined method error. // Throws an Error $tickets = Tickets::orderBy(‘price’,’desc’)->all(); When, you use orderBy you cannot use the all method, instead, you have to use the get method. So, I figured out that if I run the code below, I am able to order…

Edit Cron Jobs in Linux

If you create cron jobs in Linux, you will eventually need to edit those cron jobs. Well, how the heck do I do that? Run the command below and you’re good to go. crontab -e If you don’t see the cron job that you know that you created, make sure to run crontab -e with…

Hide Private Posts on WordPress Blog Page

If you are creating a WordPress theme or editing an existing theme and you’re seeing private posts in your blog feed, you’ve come to the right place. We don’t want no stinking private posts on our WordPress blog page! So, how the heck do we get rid of them. Step 1: Make sure you’re using…

Want to use our API?

Sign up below and we'll let you know when it's available for you to start your own WordPress hosting company.