How to add custom text in every wordpress post

How to add custom text in every wordpress post

wordpress tutorial, How to add custom text in every wordpress post. There is always common content we want put in every post. using following function we can add the custom text in every wordpress post.

How to add custom text in every wordpress post

just open your functions.php file from wordpress theme folder and put the following code in that file.


function mytext($content)
{
return "The addtional content goes here: ".$content;
}
add_filter('the_content', 'mytext');

How to add custom text in every wordpress post
How to add custom text in every wordpress post

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

2 thoughts on “How to add custom text in every wordpress post”

Leave a Reply

Your email address will not be published.