Hello!
I am using an "Hr" horisontal line (image) on every single post, but sometimes I would like to change the Hr line depending on the subject, I am also trying to get some text below or above (not sure yet where).
Is it also possible to have a variety of hr lines, like if I use hr_3, hr_4 etc so it can search for ID that starts with "hr" is this possible?
Here is a code that does not do much for me right now..
Thanks
Soren
function add_post_content($content) {
if(is_single()) {
$custom_content = get_post_meta($post->ID, 'hr_2');
if(is_empty($custom_content)) {
$content .= ‘<img src="http://mydomian/wp-content/uploads/images/hr_1.gif" style="margin: 60px auto 30px auto;" width="555" height="12" class="aligncenter" />';
$content .= ‘This article is copyright © ‘.date(‘Y’).’ ’.author(‘name’).”;
}else{
$content .= $custom_content;
}
return $content;
}
add_filter(‘the_content’, ‘add_post_content’);