• I’ve read that the ability to add a byline on posts in WordPress is theme-specific. I am using the Zillah theme, which apparently does not support this feature. Is there any way that I can automatically add bylines to every post with my name as the author — either via a plugin or by CSS code — even though my theme doesn’t offer them? I am the only author on my site, so I’m not concerned about flexibility for multiple authors; I just want to show my name as the author of each article before the main text. (I am already using the Simple Author plugin, which adds author information at the END of each post, but I’d also like a simple byline to appear at the beginning, both on individual posts and on the homepage.)

    Also, I am currently using the Under Construction plug-in, so I can’t give you a link to my site. But if you need me to upload screenshots, let me know.

    Thanks,
    Jeremy

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I recommend asking at https://www.ads-software.com/support/theme/zillah so the plugin’s / theme’s developers and support community can help you with this.

    Thread Starter jeremybeck

    (@jeremybeck)

    Hi Steve,

    As you suggested, I posted a similar question on the Zillah message board; however, I have not yet received any responses. Ignoring my specific theme, do you know of any CSS code or plug-in that would allow me to insert a byline?

    Thanks,
    Jeremy

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You’d probably have to make a child theme and add code to the child theme’s single.php to do this.

    https://codex.www.ads-software.com/Child_Themes

    Thread Starter jeremybeck

    (@jeremybeck)

    I understand that, and I’m already using a child theme. I just don’t know what specific code to add to the single.php file.

    Also, would updating the single.php file allow the byline to appear on my site’s homepage as well, in addition to individual posts? My understanding is that single.php only affects the individual posts, but perhaps I’m wrong about that. (I have the homepage set to display a shortened listing of the most recent posts, with the “Continue Reading” link to each full post.)

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I think the function you want is the_author().

    https://codex.www.ads-software.com/Function_Reference/the_author

    You’d probably have to add the code in both places.

    A plugin I find invaluable when figuring out what to edit is “Show Current Template”. Check it out.

    Thread Starter jeremybeck

    (@jeremybeck)

    OK thanks, good to know that function. But when you say “both places”, what do you mean? Is there an additional file that I’d need to add the_author() to, beyond the single.php file?

    And thanks, I’ve installed Show Current Template. Is it helpful just in that it shows which file is being called when I’m testing the site? Want to make sure I’m not missing anything.

    Finally, a related question: Because my theme didn’t automatically allow its sidebar to appear for individual posts, I followed the instructions that I found at this link: https://www.reddit.com/r/Wordpress/comments/62fzsj/adding_a_sidebar_to_zillah_theme

    That resulted in the sidebar appearing properly on posts. But it also means that my single.php file now includes quite a bit of code, and I’m not entirely sure how to maneuver around it. (I can paste the code if you’d like, but I’m not sure if that’s a no-no on the forums.) So, when I added the_author() to the single.php file as you suggested, it added the author name AT THE END of the post; I need it to appear after the headline but before the main text. Any idea how to fix this? Thanks.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    n: Because my theme didn’t automatically allow its sidebar to appear for individual posts,

    I’m not going to get into debugging stuff from reddit. It seems to me you might want to pick another theme.

    it added the author name AT THE END of the post

    You put it in the wrong place, then.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Adding byline to posts’ is closed to new replies.