Comments 1CalculatedTraveller started the conversationAugust 12, 2019 at 12:44pmI had asked before to be able to remove blank avatar and bio field for guest authors and you said it wasn't possible so I altered the author.php to fix it. It no longer works. Can you offer any advice to make it work again?<?php if ( get_the_author() != "Guest" && ! get_theme_mod( 'penci_post_author' ) ) : ?> <?php get_template_part( 'inc/templates/about_author' ); ?> <?php endif; ?> 2,700PenciDesign repliedAugust 12, 2019 at 4:03pmHi,I think you can try with this: <?php if ( get_the_author_meta('description') && ! get_theme_mod( 'penci_post_author' ) ) : ?> <?php get_template_part( 'inc/templates/about_author' ); ?> <?php endif; ?> Best Regards,PenciDesign 1CalculatedTraveller repliedAugust 12, 2019 at 7:39pmUnfortunately that didn't work either.... 2,700PenciDesign repliedAugust 13, 2019 at 3:43amHi,Please try again with this code: <?php if ( get_the_author_meta('display_name') != "Guest" && ! get_theme_mod( 'penci_post_author' ) ) : ?> <?php get_template_part( 'inc/templates/about_author' ); ?> <?php endif; ?> Best Regards,PenciDesign 1CalculatedTraveller repliedSeptember 4, 2019 at 3:49pmNo effect. That's ok. I'll work around it. 1CalculatedTraveller repliedSeptember 4, 2019 at 3:57pmApologies - my mistake - I needed to make the change in both the author.php AND content-single.php.All fixed now.Thank you! Sign in to reply ...
I had asked before to be able to remove blank avatar and bio field for guest authors and you said it wasn't possible so I altered the author.php to fix it. It no longer works. Can you offer any advice to make it work again?
<?php if ( get_the_author() != "Guest" && ! get_theme_mod( 'penci_post_author' ) ) : ?>
<?php get_template_part( 'inc/templates/about_author' ); ?>
<?php endif; ?>
Hi,
I think you can try with this:
Best Regards,
PenciDesign
Unfortunately that didn't work either....
Hi,
Please try again with this code:
Best Regards,
PenciDesign
No effect. That's ok. I'll work around it.
Apologies - my mistake - I needed to make the change in both the author.php AND content-single.php.
All fixed now.
Thank you!