How to Add Keywords and Descriptions to Your WordP...
Method 1: Using an SEO Plugin (Recommended)
With popular SEO plugins like Yoast SEO, Rank Math, or All in One SEO, you can easily add keywords and meta descriptions.
Steps:
Install and Activate the Plugin:
Log in to your WordPress dashboard.
Go to Plugins > Add New, search for plugins like Yoast SEO, then install and activate it.
Set Homepage Meta Information:
Navigate to the plugin’s settings page in the WordPress dashboard.
Look for the “Homepage” or “Sitewide SEO Settings” option (depending on the plugin).
Enter the Title and Meta Description for your homepage.
If you want to add keywords, include them in the description, as most modern SEO tools no longer support separate meta keywords fields.
Save the Settings:
Save your changes, and the plugin will automatically add the meta tags to your homepage’s
section.Method 2: Manually Edit Theme Files
If you prefer not to use a plugin, you can directly modify your theme files to add keywords and descriptions.
Steps:
Locate the Header File:
Log in to your WordPress dashboard and navigate to Appearance > Theme File Editor.
Find and open the header.php file on the right-hand side.
Add Meta Tags: Insert the following code inside the
html
Example:
html
Save the File:
Save the header.php file and refresh your homepage.
Use “View Page Source” to check if the meta tags have been added successfully.
Method 3: Add Custom Code
For more flexibility, you can add dynamic meta tags by modifying the functions.php file of your theme.
Example Code:
php
function add_meta_tags() {
if (is_front_page()) {
echo ‘‘ . “\n”;
echo ‘‘ . “\n”;
}
}
add_action(‘wp_head’, ‘add_meta_tags’);
Verify the Changes
After completing any of the above methods, you can verify the changes by:
Opening your homepage and right-clicking to View Page Source.
Checking if the
Using a plugin is the most convenient option, especially if you need to update meta information frequently. For further optimization, consider leveraging the plugin’s SEO analysis tools to improve your content.
Author: Johnson
This author has published 321 articles so far. More info about the author is coming soon.