sayyadina
asked 10 years ago

Hello team,
I’ve already asked you this but my question seems to be lost (maybe because of the security update?). I resume:
My problem was (is) this: I tried changing the number of related posts from 3 to 6. To do this, I just replaced “3” with “6” in single.php:
‘posts_per_page’=>3, // Number of related posts to display.
This did display 6 items instead of 3, but completely messed up the layout.
You replied:

Hi,
To resolve this issue, you can add the following code to the style.css file: 
.single .site-content .related-post .hentry:nth-child(4) { margin-left: 0; }
Hope this helps !

It did help. A bit. 🙂 Some pages were OK, but some were not. And I think it might have something to to with the length of the related articles titles. Please find screenshots here:
http://www.anacronic.ro/wp-content/uploads/screen1.png
http://www.anacronic.ro/wp-content/uploads/screen2.png
http://www.anacronic.ro/wp-content/uploads/screen3.png
http://www.anacronic.ro/wp-content/uploads/screen4.png
http://www.anacronic.ro/wp-content/uploads/screen5.png
Any other ideas on how to fix this?
Thanks! 

1 Answers
DominicStaff
answered 10 years ago

You can add the following code to the style.css file:

.single .site-content .related-post .hentry:nth-child(3) { padding-bottom: 100px;}

Hope this helps !

sayyadina
replied 10 years ago

I see what you did there! :)100px padding is a bit too much, it adds too much white space between rows on some pages, but 70px works fine (for article titles of 4 rows maximum). Your solution adds space below the 3-rd article no matter what, resulting in unnecessary white space between rows on SOME pages (desktop) or unnecessary white space after the 3-rd article on ALL pages (mobile). I know there is a more “complicated” way to solve this, but I also realize I may be asking too much. 🙂 So thank you, I declare myself pleased. Unless you decide to give me the more “complicated” solution, in which case I would be thrilled. 😀

Dominic Staff
replied 10 years ago

We will check and update this issue in the next version :D.

Powered by DW Question & Answer Pro