Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
I’m using Enfold Child theme and I’d like to have a standard disclaimer display at the bottom of all post pages. Is there a simple way to do this?
Hey michaelmiller68,
Thank you for the inquiry.
You can modify the page.php file or the template-builder.php file directly, or use the “the_content” filter to insert additional content to the posts.
// https://developer.wordpress.org/reference/hooks/the_content/
Example:
add_filter( 'the_content', 'filter_the_content_in_the_main_loop', 1 );
function filter_the_content_in_the_main_loop( $content ) {
if ( is_singular() && in_the_loop() && is_main_query() ) {
return $content . esc_html__( 'I’m filtering the content inside the main loop', 'wporg');
}
return $content;
}
Best regards,
Ismael