Archived topic
Different Text for a single Page
7 replies · Started by Todd on April 9, 2018
Is there a filter that would let me put in different text on a single page or 2 for the footer?
Hi Todd,
I think the only way to do this is to add some CSS font styling in your stylesheet aimed at the page id number..like so...
.page-id-9 .entry-title {
color: salmon;
font-family: impact;
}
here is a link to a Wordpress forum asking the same question. Hope you find it useful :)
https://en.forums.wordpress.com/topic/different-fontscolors-for-different-pages
This seems like this be the way to change the format not the content itself?
Hi Todd,
You could try using one of hooks in the footer with conditional tags:
http://demo.generatepress.com/hook-locations/
https://docs.generatepress.com/article/hooks-overview/
https://docs.generatepress.com/article/using-hooks-conditional-tags/#static-pages
https://codex.wordpress.org/Conditional_Tags#A_PAGE_Page
Let me know if this helps.
Leo, that worked great. Thank you. I was able to get a message to show up on one page using the following. How do I add a class to this so I could style the content?
<?php if ( is_page( 101 ) ) : ?>
TESTING Content will ONLY show in static pages
<?php endif; ?>
It would be the same as regular HTML:
<?php if ( is_page( 101 ) ) : ?>
<div class="message">TESTING Content will ONLY show in static pages</div>
<?php endif; ?>
Got it. Very Helpful. Thank you.
No problem :)