// add custom post content
function add_post_content($content) {
if(!is_feed() && !is_home()) {
$content .= '<p>Copyright © '.date('Y').' '.bloginfo('name').'</p>';
}
return $content;
}
add_filter('the_content', 'add_post_content');
The html source output is
myblog<p>Copyright © 2011 </p>
and normal:
myblog
Copyright © 2011
WHat is wrong with my php ?
_blackened_
Member
Posted 1 year ago #
Nothing. What's your charset?
And why do you write out the © and  . That's not necessary if you use the right charset.
converting2wp
Member
Posted 1 year ago #
Or are you asking why the "myblog" is coming out before the copyright notice instead of after as in the
$content .= '<p>Copyright © '.date('Y').' '.bloginfo('name').'</p>';
in your original post?
Hope you've figured this out ...
converting2wp
Member
Posted 1 year ago #
So the question is that "bloginfo" is at the end of the PHP code but at the beginning of the output?
Bizarre.
yes, correct
I really don't have a clue
converting2wp
Member
Posted 1 year ago #
it's like when u go to a shop ask where the toilet paper is, and the answer is: it's there where the toilet paper is.