Skip to content
No results
  • All articles
  • Showcase
  • About
  • Contact
draghici.net
  • All articles
  • Showcase
  • About
  • Contact
draghici.net

WordPress – Alter the_content(); function

  • Cristi DraghiciCristi Draghici
  • July 26, 2014
  • Programming

To add some content to your post body, add the following to your functions.php file:

/** Alter the content */
function add_some_content($content) {
 	$content .= 'The new content';
 	return $content;
}
add_filter( 'the_content', 'add_some_content', -9999 );Code language: PHP (php)
Tags
# Wordpress
Previous Post Wordpress - Remove category from posts list and widget
Next Post Wordpress - Add custom fields in search

Recently updated

  • Local services for convenience and privacy
  • Introduction in accessibility (a11y)
  • Improved prompts for better AI interactions
  • Accelerated AI development – Open File Sharing
  • Put a Raspberry Pi in an Argon Neo 5 Case

A quick note

I post here articles that I found interesting, solutions to problems I have encountered and last but not least, display information about my projects and achievements.

Categories

Everything else (88) Programming (178) Useful tools (24)

draghici.net © 2006 - 2025 - Most of the rights reserved