Standardising colum length in BP daily

Hi tammie,

Not sure if their is anything you can do to your theme in order to achieve this but just thought I'd ask.

I love the look of the columns on the front page with the thumbnail pictures, however I have noticed that when your headline of your post is longer or shorter than others that it can upset the alignment and make things look just a little messy.

Also, what is the criteria that the column looks for in the post to know how much of it to display? Does it count words etc and just display a certain number? Sometimes this can cause the column to be longer or shorter than the one next to it too.

See the screenshot below as an example.

If padding or something could be used to create exact same sized columns the theme would be perfect and look ultra professional.

Is there anything you can do to the theme to standardise these columns and make this possible?

Thanks again!

Ross :slight_smile:

[attachments are only viewable by logged-in members]

  • Tammie
    • WordPress Wizard

    @rossagrant: It is based on rows that start from the highest content. You could use excerpts to limit but it’s designed to do that so it looks nice in all browsers. If you wanted to add padding you could but it’s going to be hard as would need to know which ones to add padding to and unless you’re hard coding things it could be tricky.

    If you know which of your categories need it then library/components/content-columns.php is the file but it would take quite the picking through and possibly some editing if you notice it uses a lot of different calls to split it up and get all those categories and layouts. To be honest, it’s not something I’d advise editing unless you feel really comfortable with php and as specific to what you want layout wise I’d also only be able to advise.

    This all being said you could edit the excerpt function but that’s again something you’d need to look at – fairly sure there was a very recent post on this forum about that. Hope this helps a little but not sure which method you want to go with.

  • rossagrant
    • The Incredible Code Injector

    Thanks for the help Tammie.

    So in terms of the amount of excerpt it shows under the title, can it be fixed at an exact number of lines. So if I just want 10 lines of text could I specify that, therefore all excepts would finish at the 10 line mark, thus being the same length or is it not as easy as that?

    Also how have they got the category headers at the top of each column on this site, it looks better than appearing at the bottom I think.

    http://housingstorm.com/

    Lastly when I hover my mouse over the other article titles that appear under the latest post in a column, the title doesn’t highlight and underline as it does on other BP Daily sites I have been on. Any ideas?

    Cheers,

    Ross :slight_smile:

  • gregfielding
    • The Incredible Code Injector

    @rossgrant

    My solution was pretty simple. NOTE: I made the background color in the custom styling menu (i forget which setting…I think it”s “post and page title”:wink:

    Here’s how I tweaked custom-columns.php

    <?php if ($cat_nine != ""):?>

    <div class="content-block-end">

    <h3><?php _e( 'Short Sale News', 'buddypress' )?></h3>

    Do that for each category.

    Kinda stinks to have to do it manually…but it gets the job done.

  • rossagrant
    • The Incredible Code Injector

    @gregfielding

    Thanks for that Greg, I’ll take a look at that.

    Nice use of the theme over at your site too, I’m going to take a deeper look at what you’ve done. It’s great to see other’s ideas. We should maybe start a showcase topic off where people can show how they have used the BP Daily theme. I think it’s awesome!

    Ross :slight_smile:

  • rossagrant
    • The Incredible Code Injector

    The length of the columns is confusing me more and more :slight_frown: haha! I can use the EXACT same text in 2 dummy articles yet it will display a few more words of the text in one column than the other. What are the rules by which these exerpts in each column work by.

    If they could just cut off text at 10 lines it would be much easier.

    :slight_smile:

  • gregfielding
    • The Incredible Code Injector

    I’m having some mess with this too…especially if the post is some sort of list!

    Couple of snags that may make it really hard to ever look right:

    Some posts have pics, some don’t (at least for me) (I wish it would default to the author’s avatar if no post image)

    Some titles extend to a 2nd line

    If you show additional posts, those titles may extend to additional lines.

    Good luck and keep us posted!

  • rossagrant
    • The Incredible Code Injector

    Will do Greg,

    Luckily Im using a single Install and am the only member posting blog posts. Effectively my posts are used for news. All will have a picture and I can create a title that will span just 2 lines.

    It’s the content that’s a problem for me. Een when the content is the same text in 2 dummy posts I end up with 2 different sized columns which is strange.

    I just need to understand what rules it works off. Surely we can sort it so that it only takes x amount of lines in the column?

    Tammie might have an answer. Apart from this BP Daily is great, it just needs this area tweaking.

  • rossagrant
    • The Incredible Code Injector

    @gregfielding

    found a work around for this mate. I didn’t realise under each post in the admin panel was a ‘manual excerpt box. All you need to do is view which words are causing a disruption to column length and trim the excerpt accordingly. Really easy. Takes a little longer but does work.

    I’ll let you know if I find any other way!

  • Tammie
    • WordPress Wizard

    @rossagrant: depends on if you have it with images and also posts in category but here’s from the page I linked to you:

    Control Excerpt Length using Filters

    By default, excerpt length is set to 55 words. To change excerpt length using excerpt_length filter, add the following code to functions.php file in your theme:

    function new_excerpt_length($length) {

    return 20;

    }

    add_filter('excerpt_length', 'new_excerpt_length');

  • dabarnes
    • WPMU DEV Initiate

    on getting the titles above the column: i think you can just move the <h3><?php the_category() ?></h3> up to just inside the <div class="feature-wrap">. not altogether sure but it seems to be working. in the content-columns.php file.

    [attachments are only viewable by logged-in members] [attachments are only viewable by logged-in members]