Hello, website is http://www.nbntoday.com
I'd like to have one of the pages (voicemails, share, about) a different color text. How is this possible? I'm still fresh to php.
Hello, website is http://www.nbntoday.com
I'd like to have one of the pages (voicemails, share, about) a different color text. How is this possible? I'm still fresh to php.
<?php if (is_page('voicemails') || is_page('share') || is_page('about')) { ?>
<style type="text/css">
#text {
color: #e99;
</style>
<?php }; ?>
is a simple way. you could also give your body a class realted to the page you're on and then set the color in your CSS page.
I'm sorry, I wasn't clear about exactly what I needed. I would like one of the page's links to be colored text and have it hover white....instead of just a white link.
<?php if (is_page('pagename') { ?>
<style type="text/css">
a {
color: #e99;
}
a:hover {
color: #fff;
}
</style>
<?php }; ?>I get a:
Parse error: syntax error, unexpected '{' in /"abspath"/header.php on line 126
<?php if (is_page('pagename') { ?>
<style type="text/css">
a {
color: #e99;
}
a:hover {
color: #fff;
}
</style>
<?php }; ?>
<?php /* If this is the frontpage */ if ( is_home() ) { ?>
<li class="current_page_item"><a>/">Front Page</a>
<?php } else { ?>
<li class="page_item"><a>/">Front Page</a>
<?php } ?>
<?php wp_list_pages('depth=1&sort_column=menu_order&title_li=' . __('') . '' ); ?>
Obviously i'd change the slug but the page won't even process. Did I do something wrong?
oops I missed a ")"
<?php if (is_page('pagename')) { ?>
<style type="text/css">
a {
color: #e99;
}
a:hover {
color: #fff;
}
</style>
<?php }; ?>
try that
Thank you tugbucket,
That is exactly what I needed to customize one of my pages.
:-)
This topic has been closed to new replies.