Page 1 of 1

Mediumish: Change Number of Sticky Posts on Homepage

Posted: Tue Oct 04, 2022 1:15 pm
by jack123
Image

👆👆👆

I installed Mediumish theme. But on the main homepage, I can only see 2 featured posts so far. I need 4 as shown on the demo site here: https://www.themepush.com/freethemes/me ... index.html

What should I have to do for this?

Thanks.

Re: Mediumish: Change Number of Sticky Posts on Homepage

Posted: Tue Oct 04, 2022 8:40 pm
by Frodo
For this to work you need to fix the page.
This can be found when creating/editing text under Settings-> Advanced -> ART.
then do this with the 4 pages you want to fix.

Without this setting, only the last two articles are displayed as with you, but are not realy fixed.

Re: Mediumish: Change Number of Sticky Posts on Homepage

Posted: Wed Oct 05, 2022 12:10 pm
by jack123
what is ART? I don't understand.

I saw that there is 2 post limit in home.php file. I can just change that to 4...would that be a problem? I tried it and it's working.

Re: Mediumish: Change Number of Sticky Posts on Homepage

Posted: Wed Oct 05, 2022 1:08 pm
by Frodo
German language system, ART is the selection box for the different types a text can have, standart, fixed, static ... I would try "fixed
2022-10-05-13-01-09_6400x2160.jpg
2022-10-05-13-01-09_6400x2160.jpg (92.7 KiB) Viewed 1185 times
edit:
Misunderstanding on my part, by feauterd post I mean a post that stays "on top" when you have already written other, new posts.
To achieve this, you must also set the post to "fixed".

Re: Mediumish: Change Number of Sticky Posts on Homepage

Posted: Thu Oct 06, 2022 10:34 am
by Edi
jack123 wrote: ↑Wed Oct 05, 2022 12:10 pm I saw that there is 2 post limit in home.php file. I can just change that to 4...would that be a problem? I tried it and it's working.
The theme is a little bit tricky.

Default is two featured posts. You can change this by modifying the file home.php in the directory /bl-themes/mediumish-1.2/php.

You can for example use (line 21):

Code: Select all

<?php
   // Get the first and second page from the content
   $featured = array_slice($content, 0, 4);
   $content = array_slice($content, 4);
   foreach ($featured as $page):
?>
instead of

Code: Select all

<?php
   // Get the first and second page from the content
   $featured = array_slice($content, 0, 2);
   $content = array_slice($content, 2);
   foreach ($featured as $page):
?>
Further you have to set "Items per page" to "all content" ("Settings" > "General" > "Advanced").

At the moment the theme works only as one page website. I can try to fix this.