Plugin-1: Add some text at the end of all blog post
- Create a .php file within a folder. Their names should be similar. This is a common naming convention.
- Add a comment at the top:
Plugin Name:
Description:
Version:
Author
Author URI:
- Plugin can now be installed.
-
add_filter(“the_content”, “addToEndOfPost”);
function addToEndOfPost($content) {
return $content.”My name is Rejaul
”;
}
Plugin-2: Word Count
https://github.com/rejauldu/wordpress-plugin-by-brad
ACF
- Adding group: Custom fields > Add new (Field Group) > Write in Add title > Publish
- Adding field:Add field > Add field label, name, type, instructions > Update. Remember the name (it is slug)
- Adding location: page type > home page
- Done!
- Go to home page template like front-page.php
- echo get_field('name') //name is the slug from step 2
- https://www.youtube.com/watch?v=eMCOE9x5mCc
Labels: Plugin development, Web development, WordPress