Lightweight WordPress Meta Tag Description Plugin in 5 Minutes

No child themes. No heavy plugins. No file hacks that vanish on updates. Just your own lightweight WordPress plugin to add a global meta description tag.

  1. Connect to your WordPress hosting server via FTP.
  2. Create a new folder:
    wp-content/plugins/mymetadescription
  3. Inside that folder, create a file:
    mymetadescription.php
    Add the code provided below into this file.
  4. Activate your plugin in the WordPress Admin Dashboard.
<?php
/*
Plugin Name: MyMetaDescription
Description: Adds a global meta description to the header.
Version: 1.0
Author: YourName
*/

function add_meta_description() {
    echo '<meta name="description" content="Enter your blog description here." />' . "\n";
}

add_action('wp_head', 'add_meta_description');

To verify it works, reload a page on your blog, view the page source, and search for:

<meta name="description"

Comments

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.