Tagged: x
-
AuthorPosts
-
December 6, 2016 at 2:50 pm #1283638
peterdavidgrantParticipantHi there,
I’m building a site offline (using MAMP), and have a problem relating to Authors.
Using ICON and the masonry blog post page, I’d like to show the Author along with date. I’ve managed this by adding the following to my child theme functions.php:
// Entry Meta // ============================================================================= if ( ! function_exists( 'x_icon_entry_meta' ) ) : function x_icon_entry_meta() { $author = sprintf( '<span><i class="x-icon-pencil"></i> %s</span>', get_the_author() ); $date = sprintf( '<span><time class="entry-date" datetime="%1$s"><i class="x-icon-calendar"></i> %2$s</time></span>', esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); if ( x_does_not_need_entry_meta() ) { return; } else { printf( '<p class="p-meta">%1$s%2$s%3$s%4$s</p>', $author, $date, $categories_list, $comments ); } } endif;How ever, what I’m after is the author being clickable, and showing a page with all of their posts, e.g. it would take me to: http://localhost:8888/author/peter-david-grant/ when clicked.
Thanks,
PeterDecember 6, 2016 at 10:35 pm #1284057
RupokMemberHi Peter,
Thanks for writing in! You can follow these threads :
– https://community.theme.co/forums/topic/link-authors-name-to-all-posts-by-author-page/
– https://community.theme.co/forums/topic/how-to-make-the-author-clickable-in-post-meta/Cheers!
December 7, 2016 at 1:44 am #1284185
peterdavidgrantParticipantHi Rupok,
Thank you for the reply.
I checked out those two links, but the code doesn’t seem to work, and it removes the author that I managed to get displayed. See attached image.
Thanks again!
December 7, 2016 at 1:45 am #1284188
peterdavidgrantParticipantoops. sorry I’ve attached basically the same image twice! Sorry. The second was meant to be a blog post view.
December 7, 2016 at 2:46 am #1284233
ChristopherModeratorHi there,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks.
December 7, 2016 at 12:58 pm #1284956
peterdavidgrantParticipantHi Christopher,
Unfortunately my site is only local at the moment, waiting for someone else to set me up with the hosting package. I’ll update this support page after it’s online with the details.
Thanks,
PeterDecember 7, 2016 at 4:57 pm #1285232
LelyModeratorOk then Peter. We will get back to you once we have those details so we can check further.
December 26, 2016 at 10:54 am #1304714
peterdavidgrantParticipantThis reply has been marked as private.December 26, 2016 at 11:19 am #1304743
ThaiModeratorHi There,
Please update your code to this:
function x_icon_entry_meta() { global $post; $author = sprintf( '<a href="%1$s"><span><i class="x-icon-pencil"></i> %2$s</span></a>', get_author_posts_url( $post->post_author ), get_the_author() ); $date = sprintf( '<span><time class="entry-date" datetime="%1$s"><i class="x-icon-calendar"></i> %2$s</time></span>', esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); if ( x_does_not_need_entry_meta() ) { return; } else { printf( '<p class="p-meta">%1$s%2$s%3$s%4$s</p>', $author, $date, $categories_list, $comments ); } }Hope it helps 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1283638 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
