Hi,
I recently followed the instructions (method 3) on https://www.wpbeginner.com/wp-tutorials/how-to-add-an-author-info-box-in-wordpress-posts/ so that my bio would appear on each blog post. It worked, but I’ve found that a bio (either mine or admin) has appeared on every portfolio item, under the find out more bar, near the bottom. Can I get rid of the bio on each portfolio item please, as I only want it underneath each blog post.
http://www.westcoast-mountainguides.co.uk
Thanks!
Hey kenwcmg,
You might want to use the code below to make sure it only works for posts:
if (is_singular('post')) {
//your code here...
}
If you need further assistance please let us know.
Best regards,
Victoria
Hi Victoria,
Many thanks for the reply. So that I don’t mess things up, could you let me know where I should put that code please? I currently have the following in my quick SCC:
.
author_bio_section{
background: none repeat scroll 0 0 #F5F5F5;
padding: 15px;
border: 1px solid #ccc;
}
.author_name{
font-size:16px;
font-weight: bold;
}
.author_details img {
border: 1px solid #D8D8D8;
border-radius: 50%;
float: left;
margin: 0 10px 10px 0;
}
Thanks!
Hi kenwcmg,
You need to insert it in functions.php which can be found in Method 3: Adding Author Info Box Using Code in the link you gave.
I believe you have this code:
if ( is_single() && isset( $post->post_author ) ) {
try to replace it with:
if ( is_singular('post') && isset( $post->post_author ) ) {
and that should do it.
Best regards,
Nikko
Hi, thanks, sorry, I clearly didn’t read it quite carefully enough! Really appreciate your help!
Hi kenwcmg,
No worries that’s what we are here for :)
Let us know how it goes and if you need further assistance.
Best regards,
Nikko