WordPress plugins

Plugin-1: Add some text at the end of all blog post

  1. Create a .php file within a folder. Their names should be similar. This is a common naming convention.
  2. Add a comment at the top:
    Plugin Name: 
    Description:
    Version:
    Author
    Author URI:
  3. Plugin can now be installed.
  4. 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: , ,

© copyright-2020 Rejaul