Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Buddypress Default theme frontpage modifications. (8 posts)

Started 5 months, 4 weeks ago by: blogsabout

  • Profile picture of blogsabout blogsabout said 5 months, 4 weeks ago:

    hello there
    I’m new to theming in Wordpress, but having a blast! Just loading my own childtheme for the first time is a great feeling.
    I have learned how to add code to header, sidebars etc..
    I have two questions that seems to trick me a bit.

    1. How to set a maximum character amounts for the post summary (which isn’t really a summary, since the whole post is being show) so it automatically just cut the text and add a “read more” afterwards?

    2. The summary has the author avatar shown on the frontpage.
    If I wanted to get rid of that and have a thumnail there, (It already shows an image, but that’s the one
    in the article. What if ai wanted to have a smaller thumbnail..?
    Basically I’m trying get a more “magazine” look and a feel to my theme.

    Would appreciate any direction:)

    Cheers, Dan

  • Profile picture of blogsabout blogsabout said 5 months, 4 weeks ago:

    basically I can’t find the code that render out those summaries.

  • Profile picture of Xevo Xevo said 5 months, 4 weeks ago:

    1. http://codex.wordpress.org/Function_Reference/the_excerpt Since the default buddypress theme uses the_content.

    2. http://www.wpbeginner.com/wp-themes/how-to-add-post-thumbnails-in-wordpress/ Should get you going.

  • Profile picture of @mercime @mercime said 5 months, 4 weeks ago:

    #1.
    a) Copy over index.php file from bp-default theme to your child theme folder.
    b) Open up index.php in child theme folder and make the following change. On line # 37 of that file, replace:
    <?php the_content( __( 'Read the rest of this entry ?', 'buddypress' ) ); ?>
    with

    <?php
    if ( is_home() ) {
    	the_excerpt();
    } else {
    	the_content( __( 'Read the rest of this entry ?', 'buddypress' ) );
    }
    ?>

    c) If you don’t have one yet, create a blank functions.php file in your bp-default child theme folder, then add the solutions to excerpt length and “Read more” are at http://codex.wordpress.org/Function_Reference/the_excerpt

    #2. The avatar with username is wrapped in div.author-box lines 22 – 29 in the same index.php file you copied over

    EDIT – took too long to answer. Didn’t see Xevo’s post :-)

  • Profile picture of 4ella 4ella said 5 months, 4 weeks ago:

    @mercime thank you , works perfect .

  • Profile picture of blogsabout blogsabout said 5 months, 4 weeks ago:

    Thanks a lot…
    In my end I get a parse error
    Parse error: syntax error, unexpected ‘{‘ in xxxxxxxx/index.php on line 41
    ?

    Thanks mercime for awesome help as always..and thanks Xevo. I’m learning:o)

  • Profile picture of 4ella 4ella said 5 months, 4 weeks ago:

    @mercime how can I implement to your expert’s code feature post image with for example fixed width=100 height=100?

  • Profile picture of 4ella 4ella said 5 months, 3 weeks ago:

    resolved , for those who are interested: http://www.famousbloggers.net/3-wordpress-tricks.html