johnnycardy
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Super Cache] Homepage not caching for anonymous visitorsI haven’t fixed it – I’m just leaving it until either someone can help, or I’ve got time to debug it further. I’ll keep this thread updated.
Forum: Themes and Templates
In reply to: [Expound] Coauthors on ExpoundThe child theme might not be picking up the ‘/inc/template_tags.php’ file. I know it was generating an error earlier, but I’m assuming that’s before you decided to create a child theme.
Try deleting that file from your child theme, and instead, create a functions.php file in your child theme. The add the new expound_posted_on function into it. Don’t include the
function_exists
call. So all you should have is a style.css and a functions.php which looks like this:<?php function expound_posted_on() { $human_time = expound_human_time_diff( get_the_time( 'U' ), current_time( 'timestamp' ) ); $regular_time = get_the_time( get_option( 'date_format' ) ); $output_time = sprintf( '%s <span style="display:none;">%s</span>', $human_time, $regular_time ); if ( current_time( 'timestamp' ) > get_the_time( 'U' ) + 60 * 60 * 24 * 14 ) $output_time = $regular_time; if ( function_exists( 'coauthors_posts_links' ) ) { coauthors_posts_links(); } else { // translators: 1: who, 2: when printf( __( '%1$s / %2$s', 'expound' ), sprintf( '<a class="author" rel="author" href="%s">%s</a>', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), get_the_author() ), sprintf( '<a class="entry-date" href="%s">%s</a>', esc_url( get_permalink() ), $output_time ) ); } } ?>
Forum: Themes and Templates
In reply to: [Expound] Coauthors on ExpoundBe careful modifying a theme, if you update the theme then your changes will be lost. A child theme is a better idea.
That said, this should work:
function expound_posted_on() { $human_time = expound_human_time_diff( get_the_time( 'U' ), current_time( 'timestamp' ) ); $regular_time = get_the_time( get_option( 'date_format' ) ); $output_time = sprintf( '%s <span style="display:none;">%s</span>', $human_time, $regular_time ); if ( current_time( 'timestamp' ) > get_the_time( 'U' ) + 60 * 60 * 24 * 14 ) $output_time = $regular_time; if ( function_exists( 'coauthors_posts_links' ) ) { coauthors_posts_links(); } else { // translators: 1: who, 2: when printf( __( '%1$s / %2$s', 'expound' ), sprintf( '<a class="author" rel="author" href="%s">%s</a>', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), get_the_author() ), sprintf( '<a class="entry-date" href="%s">%s</a>', esc_url( get_permalink() ), $output_time ) ); } }
That pushes the whole white main section down to below the header, and not just the image. I’m gonna stick with the previous fix because as long as IE8 is working that’s the main thing.
Thanks again for your help!
No luck that time.
Andrew, that fixes the issue in IE8 but not IE7 – I don’t really care about IE7 though. Thanks a lot for your help.
I have it now.
OK, that would be great!
I’m not using a child theme, I’m on latest WordPress and latest theme. I can customise it and probably fix it but I thought I should log it for Caroline to look at…is this the right place to do that?