Skip to:
Content
Pages
Categories
Search
Top
Bottom

Avatar-less


  • barboncaves
    Participant

    @barboncaves

    I don’t want any avatars on my site at all!

    OK, so I don’t upload an avatar, no sweat. But how do I get rid of the ugly text next to every instance of a user’s name which says “Profile picture of..” or “Avatar of..” – it’s really bugging me. Couldn’t this just have degraded to blank if someone didn’t upload an avatar? Why on earth do we need the alt text?…..totally bizarre!

Viewing 10 replies - 1 through 10 (of 10 total)

  • Henry
    Member

    @henrywright-1

    Try adding this to your theme’s style.CSS document

    .avatar {
        display: none;
    }

    barboncaves
    Participant

    @barboncaves

    Hi Henry, thanks for the idea. Unfortunately absolutely no affect at all 🙁

    Incidentally, the style.css file within the default buddypress distro, ie. at plugins/buddypress/bp-themes/bp-default, is completely empty of any styles!!! The same goes for rtl.css whatever that does. How does the theme style itself?…it must be magic!!

    To be honest, I would have thought the inclusion or not of avatar stuff would be a function within a php file somewhere…but it’s needle in a haystack stuff for a non-geek like me!


    aces
    Participant

    @aces

    @barboncaves
    Have you tried disabling Show Avatars in WordPress Admin > Settings > Discussion? ( – the avatars section is lower down the page )

    You might need to customise your child theme’s style sheet. Using bp-default the following might be useful:

    
    .activity-list .activity-content {
        margin-left: 25px;
    }
    

    I haven’t checked anywhere else…


    barboncaves
    Participant

    @barboncaves

    Aha! Now we’re getting somewhere!

    Thanks for that, aces, good step in the right direction, that! I didn’t really want to disable avatars for those who wanted them, but where there wasn’t an avatar to display I’d have preferred just blank space to the left of the title/name. There is a ‘blank’ option, although it’s obviously a white image! But all told, this solution is on the right path.

    Child themes?……what are they?


    aces
    Participant

    @aces

    @barboncaves

    The main point of a child theme is that you can upgrade the parent theme and still keep your edits.

    To create a child theme of bp default you need to create a new directory ie: /wp-content/themes/bp-child/

    In that directory you need to create a style.css simple text file with a header at the top of the file ie:

    /*
    Theme Name: A BP Child Thene
    Theme URI: http://buddypress.org
    Description: A Buddypress child theme.
    Version: 0.1
    Author: Me
    Author URI: http://example.com
    Template: bp-default
    Tags: buddypress
    */

    The Template: bit is important. The /* and the */ ‘comment out’ what is between them so the browser doesn’t try to interpret as css.

    After the header comes the style rules and properties such as were quoted above.

    To follow through with an example from your other question using the bp-default theme.

    First you need to copy footer.php from /wp-content/plugins/buddypress/bp-themes/bp-default/ into the /bp-child/ theme directory.

    In that file should be the following line 15:
    <p><?php printf( __( 'Proudly powered by <a href="%1$s">WordPress</a> and <a href="%2$s">BuddyPress</a>.', 'buddypress' ), 'http://wordpress.org', 'http://buddypress.org' ); ?></p>

    Replace that line with something like:

    <p>© <?php echo date('Y'); ?><a href="<?php echo home_url( '/' ) ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    					<?php bloginfo( 'name' ); ?></a>. </p>

    Put what you want between the paragraph tags ( <p> and </p> ) – it could just be simple text. Use a text editor not a word-processor…

    Then preview the bp-child theme and the footer text should have been changed.

    I would suggest backing up your files and database before attempting to edit files….

    further info:
    https://codex.buddypress.org/themes/building-a-buddypress-child-theme/
    https://codex.wordpress.org/Function_Reference/get_bloginfo


    barboncaves
    Participant

    @barboncaves

    Wow, thanks for that explanation, aces!
    Looks like ‘code’ to me!….I don’t really do that, certainly cant write css. Might be able to change some simple text if I’m shown where to do it.
    Guess I might be getting into deep water here….. 😉


    aces
    Participant

    @aces

    @barboncaves

    Actually I was trying to keep it simple and I don’t know what theme you are using.

    Copy footer.php from the parent theme directory to your new child theme direcory and change that line to what you want.

    If you are using bp-default then that line is https://buddypress.trac.wordpress.org/browser/tags/1.8.1/bp-themes/bp-default/footer.php#L15 – just replace the text between the paragraph tags with a simple text line

    ( or even the whole line as the <p> </p> tags arent’t critical but help with styling )


    barboncaves
    Participant

    @barboncaves

    Appreciate what you’re doing, aces. Only it suggests that things could get rather complex, at least for a non-coder like me! Oh well, I’ll just have to bow out if it gets too tricky…

    So you mean I can drop any bit of amended code into a ‘child theme’ directory, and it kind of substitutes those parts of the main theme? But I don’t have to create a ‘whole’ theme, I can just drop relevant bits in?

    I’m using the default BP theme.

    (ps. sorry if I offended you or others with the Proudly post – looks like Mr.Moderator took umbrage, displaying a complete misunderstanding of what pride is.)


    aces
    Participant

    @aces

    @barboncaves

    wordpress/buddypress uses the template file ( ie footer.php ) in the child theme directory if it exists, otherwise it uses the parent’s file.

    *.php files are simple text files and normally everything means something. Most things have opening and closing tags which you need to be aware of, but in general, what you put in the child theme’s file will then be used…

    functions.php and style.css are loaded after the parent theme’s versions.

    The only file a child theme needs is a style.css which will overwrite rules in the parent’s css


    barboncaves
    Participant

    @barboncaves

    Right ok, that’s brilliant, many thanks. Essentially the child theme holds pieces of updated or amended code.

    Thanks for the help, aces!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Avatar-less’ is closed to new replies.
Skip to toolbar