Tagged: , ,

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #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

    #677519

    Hey emilgandersson!

    Can you please post the link to your page?

    Best regards,
    Yigit

    #677520

    Here you go.

    #677533

    Hi!

    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,
    Yigit

    #678990

    Hi,
    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?

    #679000

    Hi!

    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!
    Basilis

    #679902

    No, 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.

    #681325

    Hi,

    Can you please temporary admin logins and FTP logins here privately as well?

    Best regards,
    Yigit

    #1035361

    Hi,

    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.

    #1035778

    Hi 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,
    Victoria

    #1036944

    added login details below, along with a link to the av-helper-masonry.php file in case that is any help.

    Thanks,

    #1039692

    Hi,
    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; 
    }

    2018-12-01-095922

    Best regards,
    Mike

    #1041044

    Hi 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?

    #1042308

    Hi,
    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,
    Mike

    #1043355

    Hi 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.

    #1043520

    Hey 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

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘Add Author to Masonry’ is closed to new replies.