Skip to:
Content
Pages
Categories
Search
Top
Bottom

Finding .css style file


  • tonydes
    Participant

    @tonydes

    Hi guys,

    I apologize in advance, my skills are pretty minimal and I couldn’t find a solution to my problem. I just installed the forum on my site, but the pictures (avatars) for ‘last updated by’, started by’ are huge! Where do I find the.css file to edit them, and what code do I use?

    Thanks in advance for the help!

Viewing 25 replies - 1 through 25 (of 28 total)

  • Robkk
    Moderator

    @robkk

    Step by step guide to setting up a bbPress forum – part 2

    heres is a straight link to where you need to be, but reading the whole page isnt bad too


    tonydes
    Participant

    @tonydes

    Thanks for the reply @robkk. Quick question though, if I use a child theme do I create a folder and copy the css file there or to the parent theme? Also once I copy it, do I add relevant code to the file itself or to the custom css editor on wordpress?

    Thanks again!


    Robkk
    Moderator

    @robkk

    @tonydes child theme

    you put it either one i guess,

    i copy most of my code into my custom css editor in my theme because it works automatically for me

    but if i have to put the code into my bbpress.css in my child theme , i have to add !important alot


    tonydes
    Participant

    @tonydes

    @Robkk Thanks for the response, but I moved the file to both locations, and edited the css but nothing worked. I used this code to resize the images:

    #bbpress-forums div.bbp-template-notice img.avatar, #bbpress-forums p.bbp-topic-meta img.avatar {
    width: 20px !important;
    height: 20px !important;
    }

    I’m pretty sure my theme does not use a conventional style sheet so I may have to edit this in the root folder?


    Robkk
    Moderator

    @robkk

    give me a link to your site

    so i can see if its a special code in your template making the avatars huge
    if its a .avatar css rule making all the avatars on your site big
    or if i could find something else.

    Iโ€™m pretty sure my theme does not use a conventional style sheet so I may have to edit this in the root folder?

    thats not a good idea , it will be lost next upgrade.


    tonydes
    Participant

    @tonydes

    So the css editor works, and this code got rid of all my avatars, but I’d like to keep the one in the post itself;

    .bbp-author-avatar {
    display: none;
    }

    Here’s a link to the over sized pictures: http://goo.gl/wmTgBo

    Thanks for taking a look at it! Much appreciated!


    Robkk
    Moderator

    @robkk

    @tonydes you dont know how much im laughing, its like your forum is bombarded with a gallery of your self portrait. xD

    do you want the started by and freshness authors still if they were just a smaller size??

    and also the notice author image if it was a smaller size??

    but first try this if you dont want any of those avatars, see if this code works.

    .avatar-14 { display: none !important; }


    tonydes
    Participant

    @tonydes

    @robkk haha I know, the images are absurdly huge! I tried the code but unfortunately it didn’t work ๐Ÿ™ Honestly I ‘d prefer if none of those avatars were there except for the one in the post. However, I’ll take smaller avatars any day rather than those big pictures!


    tonydes
    Participant

    @tonydes

    @robkk haha I know, the images are absurdly huge! I tried the code but unfortunately it didn’t work ๐Ÿ™ Honestly I ‘d prefer if none of those avatars were there except for the one in the post. However, I’ll take smaller avatars any day rather than those big pictures!


    Robkk
    Moderator

    @robkk

    @tonydes

    what is your theme?? (you should link to it if you can)
    what are all your plugins??
    are you making a bbpress custom theme?? (did you copy the templates into your child theme??)

    a work around for displaying some avatars, is copy the templates in the child theme, look for the specific call of an avatar and wrapping a class around it then include certain css for that class and image,css display:none; the rest and see if that works.

    other than that it might be cdns , or it could be where you have to contact your theme developer.


    tonydes
    Participant

    @tonydes

    @robkk, I’m using a premiumpress theme. I tried again after disabling all my plugins, but the code still didn’t work.
    I don’t have a bbpress custom theme either. I’m pretty novice at this, but does this mean that I have to edit from the style sheet?


    Robkk
    Moderator

    @robkk

    first one more question , do you have custom css rules that you added already that include modifying images?

    I donโ€™t have a bbpress custom theme

    okay create a bbpress custom theme now, add all the templates into your child theme.

    more info here https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum-part-3/

    lets work on this first http://revlanka.com/forums/forum/automotive-news/local-news/

    since it has the issue on the notice , started by and freshness authors

    now go to loop-single-topic.php and find

    <span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span>

    does it say 14 ?

    if you dont want the started by author image remove make it where its like this

    <span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link() ); ?></span>

    tell me if that works

    Iโ€™m pretty novice at this, but does this mean that I have to edit from the style sheet?

    all of the images that have issues (started by, notice, freshness), are sized in the templates in php rather than css .


    Robkk
    Moderator

    @robkk

    @tonydes i just forgot about this, do this first

    pay attention to the started by image on the link to your forums in the above post.

    add this for custom css ,

    span.bbp-topic-started-by img {
    width:20px;
    height:20px;
    }

    does that change the size??


    tonydes
    Participant

    @tonydes

    @robkk

    So I did what you said and added the loop-single-topic.php to a folder in my child theme labelled bbpress. I edited out that code, but unfortunately nothing changed!


    tonydes
    Participant

    @tonydes

    I just tried out the code as well and it didn’t work.


    Robkk
    Moderator

    @robkk

    when you edited the template , did you just remove the array( 'size' => '14' )

    because when i look at http://revlanka.com/forums/forum/automotive-news/local-news/

    it doesnt even show started by: Admin anymore, just remove the array code and that should remove the avatar and thats it.


    tonydes
    Participant

    @tonydes

    Woops I had deleted the entire line. I fixed it, and the avatar for started by is now small! I’ll take that! Now it’s just the other two.


    Robkk
    Moderator

    @robkk

    okay on loop-single-topic.php in your child theme

    look for

    <span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?></span>

    does it show 14 on your theme??, to remove it replace with this

    <span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id()) ); ?></span>

    did it work??


    tonydes
    Participant

    @tonydes

    It does show 14. I replaced it, but it didn’t change. Do I need to add any code to the CSS editor?


    Robkk
    Moderator

    @robkk

    mann your bbpress is acting weird….

    try

    span.bbp-topic-freshness-author img {
    width:20px;
    height:20px;
    }

    tonydes
    Participant

    @tonydes

    That worked! I can’t believe I’m almost there! And yes this thing is ridiculous, but man you’re a lifesaver!


    Robkk
    Moderator

    @robkk

    the last is pretty hard. because i never found a template where you can edit the notices.

    do you want these notices at all??


    tonydes
    Participant

    @tonydes

    I wouldn’t mind getting rid of the ‘last updated by’. I’d like to keep the other two if that’s possible.


    Robkk
    Moderator

    @robkk

    place this inside your child themes functions.php

    add_filter( 'bbp_get_single_forum_description', 'ja_return_blank' );
    
    add_filter( 'bbp_get_single_topic_description', 'ja_return_blank' );
    
    function ja_return_blank() {
    
        return '';
    
    }

    tonydes
    Participant

    @tonydes

    I added it and it looks like something went wrong.

    Parse error: syntax error, unexpected ‘function’ (T_FUNCTION) in /home/revlanka/public_html/wp-content/themes/template_DL-child/functions.php on line 29

Viewing 25 replies - 1 through 25 (of 28 total)
  • You must be logged in to reply to this topic.