Hi Guys,
Is there some kind of CSS code I can input to make my headshot run next to my byline, in the same way they do at the links below?
https://www.theatlantic.com/ideas/archive/2018/10/the-guardrails-fall/572242/
Thanks!
Dave
Hi Irreverent Gent,
If this is what you’ll like https://www.screencast.com/t/sxTVoxJLbi , than copy this custom css and past it in Newspaper> Theme panel> Custom code > Custom css
.nav {
padding-bottom: 10px;
border-bottom: 1px solid black;
margin-bottom: 20px;
}
You can change the value of css, also you can add more if you like.
Thanks.
Hi Calin,
Thanks for your quick response. I think there’s been a misunderstanding. What I’m looking for is the ability to have a photo show up next to my author name, as it does in the two links posted above. Is there a code I can input that will automatically attach an image to the author name at the top of a post?
Hi,
You can do that but you need to make some change in td_modules_single_base.php
https://www.screencast.com/t/iZZ8cEvutbg
the code is: $buffy = ‘<div class=”aut”>’. get_avatar($this->post->post_author , ’50’) .'</div>’;
See results: https://www.screencast.com/t/Pd94z2InO
You can add class and style with css.
Hope this will help you.
Hi Calin,
I inputted the code and got the message “syntax error, unexpected T_Class”
Any idea how to fix that error? Thanks so much for your help with this.
Hi,
Please be noted that need a custom modification for that, I just given you an example how to do it, but if is not done correctly will damage your website, so if you don’t have the proper skills please consider to hire a developer.
Thank you for your understanding..
Thanks Calin, I managed to figure it out and it’s looking great.
Two additional questions:
1. Is there some code I can input to make the image a circle, rather than a square?
2. Is there some code that would put it next to the author name, rather than above it?
Thanks again for all your help.
You can actually have the image appear via the new cloud library templates https://forum.tagdiv.com/tagdiv-cloud-library-plugin/. Just import a single posts template and modify it. The author element has a way to show the photo and to modify it to be circular http://prntscr.com/l45h6g (the photo radius option makes it circular). You can then deploy the new template via the theme panel like default posts templates.