I'm trying to override the_content with HTML from my functions.php file. I want to:
1. Check if this is Page X
2. If it is the correct page, replace the_content with my own code
Is there a way to do this? Thanks
I'm trying to override the_content with HTML from my functions.php file. I want to:
1. Check if this is Page X
2. If it is the correct page, replace the_content with my own code
Is there a way to do this? Thanks
It would be easier to add the coding to the page template file.
<?php if( !is_page('X') ) :?>
[ custom content ]
<?php else the_content();
<?php endif;?>But if this is for a plugin, a template file update is not option correct?
This topic has been closed to new replies.