Home » Wordpress » Add Content at the Begining of the Existing Content in WordPress Post
Wordpress

Add Content at the Begining of the Existing Content in WordPress Post

wordpress-increase-character-length-excerpt

WordPress allows custom filter function to add additional content to the beginning of the existing content from your “function.php” file without writing anything directly in the “single.php” file or “page.php” file.

Add the following code in your function.php file in the theme folder

Replace ‘YOUR CONTENT GOES HERE’ with your custom content, so that it will be displayed at the beginning of the content. It will be good for those who are trying to add an advertisement script on the content page.

If you want the new content only in the single post page use the condition “is_single()” inside the function see the code

About the author

Vipin

Hi, i am Vipin, a programmer working in Dubai, UAE. I love blogging, and so started TechRounder for sharing my findings and other digital informations with others too. Please feel free to share your feedback with me in the comment section below or you can email me at vipin@techrounder.com.

Add Comment

Click here to post a comment

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

Get latest updates
in your inbox

Subscribe to TechRounder mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.