Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Paul Bearne

    (@pbearne)

    not easily 🙂

    two options

    you can use this filter ‘aa_user_template’

    which allows you to adjust the output HTML for each user

    You will get something like this this

    <div class="user with-name"><a href="http://www.anexartiti.gr/author/ngionis/" title="Νίκος Γκιώνης"><span class="avatar"><img src="http://0.gravatar.com/avatar/cbe5f4b9330b5483f8dd9b9de664b3ef?s=130&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D130&r=G" class="avatar avatar-130 photo" height="130" width="130" title="Νίκος Γκιώνης" alt="Νίκος Γκιώνης"></span><span class="name">Νίκος Γκιώνης</span></a></div>

    and you will need return all the code but with an
    in the name using REGEX replace

    <span class="name">Νίκος<br />Γκιώνης</span>

    or you can do the same in jQuery

    Sorry I can’t help any more

    Thread Starter GeorgeNegas

    (@georgenegas)

    Thanks for the reply! Yeah, does sound complicated! Is this how it was done on this website? http://www.aixmi.gr/index.php/about-2/

    Many Thanks once again!

    Plugin Author Paul Bearne

    (@pbearne)

    they not using my plugin

    It looks like there using but this is old code
    http://wordpress.org/plugins/wordpress-users/
    https://github.com/jonkemp/wordpress-users/blob/master/wp-users.php

    Let me see if I can sort some code for you

    Plugin Author Paul Bearne

    (@pbearne)

    Here is some jQuery

    jQuery('.author-list .name').each( function(index, value) {
    jQuery(value).html(jQuery(value).html().replace(' ','<br />'));
    });

    You may find that you need to change the height of the Avatar containers

    Thread Starter GeorgeNegas

    (@georgenegas)

    Thank you for your help! Where should I paste the jquery code? also how do I change avatar containers?

    Thanks!

    Plugin Author Paul Bearne

    (@pbearne)

    I can see that you have tried

    but it looks like you have the encode version

    jQuery('.author-list .name').each( function(index, value) {
    jQuery(value).html(jQuery(value).html().replace(' ','
    '));
    });
    this won’t work

    where it is will work once it not encoded

    add this css to you site to fix/set the height

    .shortcode-author-avatars div.author-list .user {
    height: 230px;
    }

    Thread Starter GeorgeNegas

    (@georgenegas)

    the css code alone fixed it! is there a different css code for the image, the container and the text, or all included in one?

    Many Thanks!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Split First and Last Name in two lines’ is closed to new replies.