Length and width of the boxes in the grid?

What code (using custom CSS) do I have to apply if I would want to make the width and the length of each box in the grid view smaller ? Each box contains an optional image, the title, date and a few lines of text. How to reduce their size ?

Hi,

Please post a link to your website, so we can check.

Best Regards,
Csaba

it’s only a question on two simple parameters; it’s your own theme so you should know from my description what I mean

Hi,

Yes, but I have to check your site to give you working Custom CSS. Your site is not live yet or you can’t post a link to your site?

Best Regards,
Csaba

if you go to the alizee pro demo and change the layout to three or four columns …
each rectangle in the grid has a fixed length and a width ?

Hi,

The width of them you can modify with this Custom CSS, but the height is depending how much content you have:

.blog .hentry, .grid-archive .hentry {
    width: 280px !important;
}

This is what you want to modify on it?

Best Regards,
Csaba

Thanks. In fact I want less text in each box (2 to max. three lines, now there are 4 to 5) but still keep the three or four columns layout, so I guess it’s more the height that I would have to change but if this can’t be changed I can live with that.

Hi,

You can limit the excerpt to x amount of characters by replacing this code in content.php, line 42:

<?php the_excerpt(); ?>

wit this: <?php echo substr(get_the_excerpt(), 0,60); ?>

Please let me know how it works.

Best Regards,
Csaba

It works but the […] at the end of each phrase disappears as soon as I replace that line (taking whatever number). So it looks less neat.

Hi,

Yes, if you limit, then it will be limited to the amount of characters and the … will disappear ( because it’s limited, so nothing more will be shown ).

Best Regards,
Csaba

That’s strange; of course the […] should stay in because that’s the whole purpose of showing a part of it to and invite to “read on”; if that’s not possible, then truncating the text makes no sense;

Hi,

Then, I suggest to leave the excerpt as is, so if there is “more content” and is not limited, then […] will be shown, also you can try to add this code to functions.php:

function custom_excerpt_length( $length ) {
	return 10;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 10 );

Best Regards,
Csaba

I can not find that line of code anymore (<?php the_excerpt(); ?>)

  • where should I look, in the child theme or inthe original ?

Hi,

The code you can’t find, because you have replaced it with this ( I guess ):

<?php echo substr(get_the_excerpt(), 0,60); ?>

You should look inside the parent theme.

Best Regards,
Csaba