To create a basic WordPress plugin that displays “Hello World” after every post or page, follow these steps:
- Create a new folder titled “hello-world-plugin” in the WordPress plugins directory:
wp-content/plugins/
.
![](https://www.aiuniverse.xyz/wp-content/uploads/2024/01/image-39.png)
2. Inside the “hello-world-plugin” folder, create a new PHP file named “hello-world.php”.
![](https://www.aiuniverse.xyz/wp-content/uploads/2024/01/image-42.png)
3. Open “hello-world.php” in a text editor and add the following code:
![](https://www.aiuniverse.xyz/wp-content/uploads/2024/01/image-43.png)
4. Save the file.
5. Go to your WordPress admin dashboard, navigate to “Plugins” -> “Installed Plugins”, and you should see “Hello World Plugin” listed among the plugins.
![](https://www.aiuniverse.xyz/wp-content/uploads/2024/01/image-44.png)
6. Activate the “Hello World Plugin”.
![](https://www.aiuniverse.xyz/wp-content/uploads/2024/01/image-46.png)
Now, every time you visit a post or page, you should see “Hello World!” displayed at the bottom.
Note: Remember to adjust the plugin details (name, URI, description, author, and author URI) in the plugin header according to your preference.