DO YOU NEED A CONTENT WRITER FOR YOUR BUSINESS?

Your One-Stop Solution for All Content Needs! Click here for more!
Categories: WordPress

Make a simple plugin in WordPress

Share

Plugin is very important role in WordPress and it helps to extend the WordPress functionality and features. Let’s make a simple plugin in WordPress.

For Making a plugin in WordPress you have to do following things:

Step 1: Create a directory in your plugin folder.
Step 2: Then create a PHP file in this folder and start working on that file using below code:

1. Plugin Name: Data Fetch
2. Plugin URI: http://www.namasteui.com
3. Description: WordPress collection data from database using a shortcode
4. Version: 1.0
5. Author: Namaste UI
5. Author URI: www.namasteui.com

Above lines are basic lines which we use in making any plugin.

if ( !defined( 'WP_FD_ABSPATH' ) )
define( 'WP_FD_ABSPATH', plugin_dir_path( __FILE__ ) );

This define the path of plugin directory.

And thus your plugin is ready to use.

Read Also: Make a short code in WordPress

From admin panel’s “DASHBOARD“, click on ‘plugins‘ link.
Under plugins you will find your made plugin. Then activate it.

<?php
/*
Plugin Name: Data Fetch
Plugin URI: http://www.namasteui.com
Description: WordPress collection data from database using a shortcode
Version: 1.0
Author: Namaste UI
Author URI: www.namasteui.com
*/
if ( !defined( 'WP_FD_ABSPATH' ) )
define( 'WP_FD_ABSPATH', plugin_dir_path( __FILE__ ) );
?>
Namaste UI

For any types of queries, you can contact us on info[at]namasteui.com.

Recent Posts

Writing Tools That Help Content Marketers Produce Cleaner Work

Content marketing has a hidden tax. It's not the writing itself, it's everything that happens…

3 days ago

How Data Analytics Is Actually Driving Smarter Marketing Decisions

Most marketing teams aren't failing because they lack data. They're failing because they can't act…

2 weeks ago

The Ultimate SPF Tester Guide: Boost Email Deliverability In Minutes

Email marketing continues to be one of the most effective ways for businesses to communicate,…

2 weeks ago

Sales Ops: A role that helps sales teams work as efficiently as possible

Xerox first introduced it around the mid-1970s. The need came up because the management activities…

3 weeks ago

Forex Investment Tips for Beginners

Investing in the forex market may look to be a dangerous game. With some worthwhile…

3 weeks ago

How Did The Restaurant Industry change In Post Pandemic Era?

The coronavirus outbreak has drastically changed the way we live our lives. Yes, that's absolutely…

1 month ago