-
AuthorPosts
-
August 25, 2016 at 2:09 pm #677516
Hi,
Probably an easy one.
Is it possible to add the “Author” on a new line before the “Title” and “Date” in the Masonry?Regards
August 25, 2016 at 2:09 pm #677519August 25, 2016 at 2:11 pm #677520Here you go.
August 25, 2016 at 2:58 pm #677533Hi!
Please go to enfold/config-templatebuilder/avia-shortcodes/av-helper-masonry.php file and find
$items .= "<h3 class='av-masonry-entry-title entry-title' {$markup}>{$the_title}</h3>";
and change it to
$items .= "<span class='masonry-overview-author'>".the_author()."</span>"; $items .= "<h3 class='av-masonry-entry-title entry-title' {$markup}>{$the_title}</h3>";
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,
YigitAugust 29, 2016 at 3:49 pm #678990Hi,
And thanks for the answer.
But it doesn’t work as intended.
When I insert the code it only shows my user profile, and not the author shown on the post.
Furthermore it is not me who created the post?I’m running the “Change Author” plugin – could that be why?
August 29, 2016 at 4:13 pm #679000Hi!
IS that maybe because your user profile, is the author?
Go to User -> Edit User you want and chech from the options, what do you want to be visible at the public and let us know if that will work out for you.Thanks a lot
Cheers!
BasilisAugust 31, 2016 at 11:14 am #679902No, my user profile is not the author of the posts – see screenshot.
Could it have something to do with the user roles? The only “Admin”-account is mine and the other are “Authors” – see screenshot.September 2, 2016 at 3:27 pm #681325Hi,
Can you please temporary admin logins and FTP logins here privately as well?
Best regards,
YigitNovember 20, 2018 at 1:13 am #1035361Hi,
Just wandering if this issue ever got sorted? Just that i am having the same issue, that the Yigit’s code is returning the current page’s author for all masonry items, instead of getting the author of each blog post.
Any help would be greatly appreciated.
November 20, 2018 at 8:21 pm #1035778Hi Birdster,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaNovember 23, 2018 at 1:19 pm #1036944added login details below, along with a link to the av-helper-masonry.php file in case that is any help.
Thanks,
December 1, 2018 at 5:08 pm #1039692Hi,
Sorry for the late reply, Please link to the page that has you masonry element, I didn’t find one in the source of your homepage.
The masonry element does have the author included and typically just requires some css like this:.av-masonry-text-sep.text-sep-author, .av-masonry-author { display: block !important; }
Best regards,
MikeDecember 5, 2018 at 2:22 am #1041044Hi Mike,
I have sent the direct url privately.
As for displaying the author, i don’t think that is the problem. I have added Yigit’s code from the top of this thread to my av-helper-masonry.php file, however
“.the_author().” is returning the author of the current page instead of the actual author of the posts.I basically want the same as this thread, but for the masonry grid instead of the postslider?
December 8, 2018 at 4:44 am #1042308Hi,
Sorry for the late reply, in trying to investigate this further I looked at the posts on your /knowledge/ page but so far every post seems to have the correct author listed when comparing the author of the posts in the backend.
Has this been resolved?Best regards,
MikeDecember 10, 2018 at 9:23 pm #1043355Hi Mike,
Thank you so much for looking into this, however because I had a freelance developer working on something else for this site – i asked him to have a quick look at the issue and he discovered the problem. He said something about the av-helper-masonry.php wasn’t preparing the loop for the author from the entries – so he added the following code around line 505:
$this->loop[$key]['author_display_name'] = get_the_author_meta('display_name', $entry->post_author);
He also told me that getting the authors name to link to the team page was more problematic, as the whole entry is already a href, and you can’t place a link within a link – I have therefore admitted defeat on achieving that function.
Thanks again.
December 11, 2018 at 2:53 am #1043520Hey Birdster,
I’m happy to hear that you were able to get this resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Add Author to Masonry’ is closed to new replies.