I needed to add a disclosure statement into pages on my site so the solution I came up with was to add a printf line inside of the theme file ‘content-page’ at the bottom of the entry-content section shown below. This works for me, but I would like to not print this on select pages or at least not on the home page. Could you recommend the code for this, I was trying some IF statements but unsuccessfully – or – if you have a better place to put this, that would be great.
<?php
the_content();
wp_link_pages( array(
‘before’ => ‘
‘ . __( ‘Pages:’, ‘generatepress’ ),
‘after’ => ‘
‘,
) );
printf( ‘<span class=”aff_disc”>This post may contain affiliate links, see our disclosure</span>’
);
?>
<!– .entry-content –>