try and change the posted section to:
if(is_home()) {
if(pbt_theme_option('dates_index') == 'on' || pbt_theme_option('authors_index') == 'on' ) { echo '<div class="date">';
if(pbt_theme_option('dates_index') == 'on') { the_time(get_option('date_format')); }
if(pbt_theme_option('authors_index') == 'on') { _e(" by", "magazine-basic"); echo ' '; the_author_posts_link(); }
echo '</div>'; }
}
(it might mess with the translation if you ever need one)
Hmm, that code doesn’t break the theme, but just gets rid of the date/author altogether!
To clarify, I’m happy with the way the homepage of the site looks.
This is for single posts, where the following to appear beneath the title:
February 13, 2012 by tajasel
Currently, it prints:
February 13, 2012 by
By tajasel
(Where italics indicate a different text style.)
the code you posted starts with the conditional statement is_home()
and will therefore not show on single posts;
(I might have missed that you are aiming for single posts)
try to use the code without the surrounding conditional statement; example below:
if(pbt_theme_option('dates_index') == 'on' || pbt_theme_option('authors_index') == 'on' ) { echo '<div class="date">';
if(pbt_theme_option('dates_index') == 'on') { the_time(get_option('date_format')); }
if(pbt_theme_option('authors_index') == 'on') { _e(" by", "magazine-basic"); echo ' '; the_author_posts_link(); }
echo '</div>'; }
Oh, rubbish, right, yes. Here’s the code I actually meant to post!
if(is_single()) {
echo '<div class="meta">';
if(pbt_theme_option('dates_posts')=='on') { echo '<div class="date">'; the_time(get_option('date_format')); echo ' by <?php the_author() ?> </div>'; }
if(pbt_theme_option('authors_posts')=='on') { _e("By", "magazine-basic"); echo ' '; the_author_posts_link(); }
echo '</div>';
}
I want to say part of it may very well be with the styling. Try displaying the div.date inline and see if that may help.
To be honest, I suspect if I can find a way to shift the </div>
from line 3 in the extract to after the author tag, then both bits of text will end up on the same line in the same font style, but I haven’t been able to do that without breaking the code.