-
AuthorPosts
-
July 17, 2016 at 3:16 am #661690
Hi!
I wanted to know how difficult it would be to add Author’s email to Excerpt meta data area.
I am not an experienced coder but understand the basics/intermediate level…
Thanks!!
July 17, 2016 at 5:46 pm #661796Hi justinfinocchiaro,
Could you provide us with a link to the site in question so that we can take a closer look please?
Regards,
RikardJuly 23, 2016 at 10:01 pm #664254Hi Rikard,
I would like to place the email next to author in excerpt area….you’ll notice on homepage i have products listed on homepage in magazine style.
Thanks,
mikeJuly 25, 2016 at 11:48 pm #664946Hi,
Please go to Enfold/config-templatebuilder/avia-shortcodes/magazine.php file and find
$author_output .= $author;
and change it to
$author_output .= $author; $author_output .= "<span class='av-magazine-author-email'> ". get_the_author_meta( 'user_email' ) . "</span>";
If you are using a child theme, please see – http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/
Best regards,
YigitJuly 26, 2016 at 7:31 am #665140HI Yigit,
Thanks for the instructions. It works, but it seems that it is only displaying my email instead of author email. I created the homepage which is why i think it is displaying mine…instead of the author who created the individual articles.
The hyperlinking is a bit difficult as well…i see that php is not involved but the global$. so…i’m a bit at a loss to linking individual author emails to each post. (as you can see from bottom)
Email the author: <a href="mailto:<?php echo get_the_author_meta( 'user_email' ); ?>"><?php the_author_meta( 'display_name' ); ?></a>
Thanks again!
- This reply was modified 8 years, 4 months ago by justinfinocchiaro.
July 26, 2016 at 4:26 pm #665383Wanted to update.
I believe I found the solution to attach the author name of post to excerpt.
With your help of course..i came up with this solution….
$author_output .= "<span class='av-magazine-author-email'> ". get_the_author_meta( 'user_email', $entry->post_author ) . "</span>";
Adding the $entry->post_author was what it needed.
I will now try to do the mailto link….any help would be APPRECIATED :)
another question…can this method be applied different category layout outputs like BLOG, grid layout, masonry, etc.
- This reply was modified 8 years, 4 months ago by justinfinocchiaro.
July 26, 2016 at 4:35 pm #665387Hey!
Would you like to mail to author when clicked on author name? If so, please start from scratch and find following in the file
$author_output .= $author;
and change it to
$author_output .= "<a href='mailto:". get_the_author_meta( 'user_email', $entry->post_author ) ."'>". $author_name ."</a>";
Cheers!
YigitJuly 27, 2016 at 3:32 pm #665790Would this method be applied with different category layout outputs like BLOG, grid layout, masonry, etc? Would I be able to add/change code about author email to excerpts in the said layouts, and can they be found in Enfold/config-templatebuilder/avia-shortcodes/magazine.php file
Thanks again for all your help.
July 30, 2016 at 2:15 am #666739Hi,
Would this method be applied with different category layout outputs like BLOG, grid layout, masonry, etc?
This modification will only affect the magazine element. You have to add the modification in the blog.php, postslider.php and av-helper-masonry.php file.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.