Tuesday , 18 June 2019
Home / Tag Archives: wordpress plugin tutorial (page 2)

Tag Archives: wordpress plugin tutorial

WordPress Options API – Part 2 – WordPress Plugin Tutorial

WordPress Options API

This is part 2 of our WordPress Options API tutorial. We’ll be discussing how to make our plugin more efficient using arrays in a single option setting instead of creating multiple options for 1 plugin. We’ll be using the same code we used in our last tutorial. Let’s update our file to this. [crayon-5d086e95cfb7b106493408/]  WordPress Options API A couple of …

Read More »

WordPress Options API – Part 1 – WordPress Plugin Tutorial

WordPress Options API

We learned how to create menus. Now, we’ll learn how to use the WordPress options API to allow us to store user settings for our plugin. The options API is a great way to store settings for your plugin. Your users won’t have to define every single option every time they have to use your plugin. They could also customize …

Read More »

WordPress Admin Submenus – WordPress Plugin Tutorial

WordPress Admin Submenus

In our last lesson, we discussed how to create top-level menus. We’ll now learn how to create WordPress admin submenus. We’ll be working with the same plugin we created in our previous lesson. Let’s update our menus.inc.php file to this. [crayon-5d086e95d2b9d077785495/] WordPress Admin Submenus As you can see we used the add_submenu_page() function to add a submenu. It takes in …

Read More »

WordPress Admin Menus – WordPress Plugin Tutorial

WordPress Admin Menus

So far, our plugins have been very simple. To extend the functionality of our WordPress plugins, it’s best to have a set of options for a user to configure in their admin panel. Before we can get there, we first need to add a way to get there. We can easily do this by creating WordPress admin menus for our …

Read More »

Shortcode Attributes – WordPress Plugin Tutorial

Shortcode Attributes

Let’s take it up a step and make our shortcode more flexible. What if we want the user to define their own link? Well, it’s possible if we create shortcode attributes. Let’s learn how to do so. We’ll be using the same plugin we made in the previous tutorial. We’ll just be adding onto it. Update the post you created …

Read More »

Creating WordPress Shortcodes – WordPress Plugin Tutorial

Creating WordPress Shortcodes

Shortcodes are very popular in WordPress plugins. Today, we’ll be creating WordPress shortcodes. It’s relatively simple. Create a new plugin called wpshortcodeex and update the index.php to look like this. [crayon-5d086e95d5d78642415542/] You’ll notice I renamed the function for checking the WordPress version. Reason is we don’t want this plugin to collide with any other functions. So, we give it a …

Read More »

WordPress Coding Standard – WordPress Plugin Tutorial

WordPress Coding Standard

This is something that should’ve been covered in the 2nd tutorial. We’ll be discussing what the WordPress coding standard is. I’m actually not going to write everything down, because everything is already written and explained on WordPress’s Codex. All information is clear and easy to understand. http://codex.wordpress.org/WordPress_Coding_Standards If you don’t feel like reading, watch the video to get a good understand …

Read More »

Deactivating A Plugin – WordPress Plugin Tutorial

Deactivating a Plugin

We’ve been learning a lot so far, but our plugins would be useless if the user didn’t have the correct WordPress version. In this lesson, we’re gonna take a look at how to grab the user’s current WordPress version and how we should go about deactivating a plugin. This function is actually so useful, we’re not going to create a …

Read More »

WordPress URL Functions – WordPress Plugin Tutorial

WordPress URL Functions

We just recently learned about the plugins_url() function and how handy it can be when we need to grab files from our own plugin. There are other WordPress URL functions which will be quite handy. Let’s create a new plugin.  Every time we create a new plugin, it’ll be based off the template plugin. So, I won’t be saying to copy …

Read More »

WordPress Plugin Path – WordPress Plugin Tutorial

WordPress Plugin Path

There will be times when you’ll want to grab the path to your plugin to grab an image or any file related to your plugin that you want loaded on the page. So, we’ll be learning a simple function that’ll help us do so. To grab a WordPress plugin path we use the plugins_url() function. Setting Up Alright, same as …

Read More »