Introduction
Plugins add new features to a WordPress site without changing its core code. They help you customize your site easily.
Jump into concepts and practice - no test required
Plugins add new features to a WordPress site without changing its core code. They help you customize your site easily.
<?php /* Plugin Name: My Custom Plugin Description: Adds new features. Version: 1.0 Author: Your Name */ function my_custom_function() { // Your code here } add_action('init', 'my_custom_function');
<?php /* Plugin Name: Simple Greeting */ function greet_user() { echo 'Hello, visitor!'; } add_action('wp_footer', 'greet_user');
<?php /* Plugin Name: Change Login Logo */ function custom_login_logo() { echo '<style>h1 a { background-image: url("logo.png") !important; }</style>'; } add_action('login_head', 'custom_login_logo');
This plugin adds a bold welcome message centered at the bottom of every page on your WordPress site.
<?php /* Plugin Name: Welcome Message Description: Displays a welcome message in the site footer. Version: 1.0 Author: Your Name */ function display_welcome_message() { echo '<p style="text-align:center; font-weight:bold;">Welcome to my WordPress site!</p>'; } add_action('wp_footer', 'display_welcome_message');
Always keep plugins updated to avoid security risks.
Too many plugins can slow down your site, so use only what you need.
Test plugins on a staging site before using them on a live site.
Plugins let you add features without changing WordPress core.
They use hooks to insert or change behavior.
Use plugins to customize your site easily and safely.
function change_title($title) {
return 'Welcome - ' . $title;
}
add_filter('wp_title', 'change_title');function add_footer_message() {
echo 'Thank you for visiting!';
}
add_filter('wp_footer', 'add_footer_message');