Posted inTechnology / php / Programming / wordpress

Simple Create WordPress Plugin Tutorial

Today, We want to share with you Simple Create WordPress Plugin Tutorial.In this post we will show you Create a Live Demo of Your WordPress Plugin, hear for how to create plugin in wordpress step by step with example we will give you demo and example for implement.In this post, we will learn about How to Build WordPress Plugin – Example App and Live Demo with an example.

Simple Create WordPress Plugin Tutorial

There are the Following The simple About Simple Create WordPress Plugin Tutorial Full Information With Example and source code.

As I will cover this Post with live Working example to develop create wordpress plugin from scratch, so the create wordpress plugin with database for this example is following below.

Structure of the WordPress Plugin

| – readme.txt
| – auto-post-hook.php

Coding WordPress Plugin

auto-post-hook.php

 1,'orderby' => 'rand');
  $autopostRandomPost = get_posts($autopostArguement);
  if (empty($autopostRandomPost)) {
        return null;
  }
  $autopostPost = $autopostRandomPost[0];
  $autopostPost->permalink = get_permalink($autopostPost->ID);
  $autopostPost->hash_tags = wp_get_post_tags($autopostPost->ID,array( 'fields' => 'names' ));
  return $autopostPost;
}
add_action('rest_api_init', function(){
        register_rest_route( 'autopost/v1', '/posts/', array(
                'methods' => 'GET',
                'callback' => 'autopost_retrieve_random_post',
        ));
});
?>

Running our WordPress AutoPOST Plugin

http://your_domain_name.com/jdk_wp/index.php/wp-json/autopost/v1/posts
Web Programming Tutorials Example with Demo

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Create Word-Press Plugin Tutorial.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

Your email address will not be published. Required fields are marked *

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype