Can someone please tell me how to add the author link at the bottom of a post where the tags and categories are listed? There are 4 different authors and I want to link to their work (for this blog) when you click on their names.
I’m using a child theme and I only have the style.css part.
My CSS knowledge is suuuper basic, but I’ve made a few changes by trial and error. (Took hours!) Anyway, the website is http://glamlifeblog.com/.
Thanks to anyone who can help!
I would love to figure this out too. I also have a blog with multiple authors.
I found this in another thread not realizing it might be different for the theme.
<p>This post was written by <?php the_author(); ?></p>
I put it in the index.php, but it still didn’t show up. For now, I’m using a different theme that shows the different authors for each post.
If you’re using a child theme, you’ll want to copy content.php from the original theme into your child theme folder, then open it and add this code where you’d like the author link to appear, probably just after line 62 if you want it to come after the tags:
<span class="byline"> by <span class="author vcard"><a class="url fn n" href="<?php esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" title="<?php esc_attr( sprintf( __( 'View all posts by %s', 'scrappy' ), get_the_author() ) ); ?>" rel="author"><?php esc_html( get_the_author(); ?></a></span></span>
You may need to do some additional styling in your child theme’s style.css to get it to look the way you want.
- The topic ‘Add Author Hyperlink to Scrappy Theme’ is closed to new replies.