-
AuthorPosts
-
August 25, 2015 at 11:21 am #492800
At this moment I am building a site locally and I really would like to show the author in the blog-grid layout, because we have more then one author but we like the grid layout way more then the Multi-author layout. I did find 1 other post about this issue but I can not get the solution to work ( https://kriesi.at/support/topic/show-blog-author-on-blog-grid/.)
Can you please help me to get this to work in a child theme?
Cheers,
SebastiaanAugust 26, 2015 at 11:48 am #493460Hi Pink_Monkey!
refer to this answer: https://kriesi.at/support/topic/theme-customizations-not-shown-with-child-theme/#post-311652
And also have a look here: http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/
Hope this helps.
Regards,
AndyAugust 27, 2015 at 9:51 am #493986Hi Andy,
thank you for your help! I got this part working. But now I’ve got an additional question. Is it possible to make the name of the author clickable so that when you click on it you go to the author page and see all the posts he/she added?
Regards,
SebastiaanAugust 28, 2015 at 4:44 am #494603Hi!
Did you follow the instructions on the previous post? You can replace the code with this:
$authorlink = get_author_posts_url( get_the_author_meta( 'ID' ) ); $author = the_author(); $output .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time> / by <a href=". $authorlink . ">". $author ."</a>"; $output .= "</div>";
Best regards,
IsmaelAugust 31, 2015 at 11:07 am #495713Hi Ismael,
I Thought i had it working, but now it does show the author name above the featured Image and on the home page I got all the names inside the header.The code I’ve got right now is:
$author = get_the_author_meta( 'first_name', $entry->post_author ).' '.get_the_author_meta( 'last_name', $entry->post_author ); $output .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time> / by ".$author; $output .= "</div>";
Best regards,
Sebastiaan- This reply was modified 9 years, 2 months ago by Pink_Monkey. Reason: not working after all
August 31, 2015 at 11:16 am #495717Hi Ismael,
I’ve been combining some code and got it working. This is the final code I am using$authorlink = get_author_posts_url( get_the_author_meta( 'ID' ) ); $author = get_the_author_meta( 'first_name', $entry->post_author ).' '.get_the_author_meta( 'last_name', $entry->post_author ); $output .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time> / by <a href=". $authorlink . ">". $author ."</a>"; $output .= "</div>"; }
Best regards,
SebastiaanAugust 31, 2015 at 3:59 pm #495917 -
AuthorPosts
- You must be logged in to reply to this topic.