fbpx

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 Getting Data Attribute Values…

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. 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 the collection based on the set field…

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. If you don’t see the cron job that you know that you created, make sure to run crontab -e with the user…

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…

Simple Website Scraping Script

In building out some functionality for WPLauncher, we needed to pull the PHP versions from php.net/releases. In order to do this, we didn’t want to go through the page and copy each of the over 100 PHP versions, we’re developers after all! So, we put together a super simple website scraping script using jQuery and…

Add WordPress Post or Page Programmatically

In creating a plugin, I ran across the need to add a WordPress post or page programmatically. This is very easy if you are developing or have developed a theme or plugin. You will need to use the wp_insert_post WordPress function. See the code below to add a WordPress post or a WordPress page programmatically….

Force File Download in WordPress

While working on providing users who subscribe to our newsletter with free downloads of our hand drawn arrows from our post called Add Call to Action Arrows on a Button, we realized that we have never needed to do this. So, we created a free plugin that makes this a piece of cake. This plugin…