- This topic has 5 replies, 2 voices, and was last updated 6 years, 3 months ago by tikaram.
-
AuthorPosts
-
January 25, 2018 at 8:40 am #130518KMZ_FNParticipant
Hey there!
Well… the title says it all^^
Is that possible? (I found some tuts in a different language, but it’s not working)I know that -usually- it’s not intended to be, but maybe you have some tutorial around how I could modify the page.php
to display a static content on top, like a regular page, and underneath show all (or a fixed number) of recent posts.suggestions?
Cheers,
Fred 🙂
January 25, 2018 at 11:32 pm #130568tikaramKeymaster@kmz_fn : You will need to get your site customized to get the desired results. I suggest you to hire a customizer to get your site customized as it involves making changes on your site files and customizing your site with a child theme. Let me know if you have any more there related issues.
Regards,
TikaramJanuary 29, 2018 at 4:48 am #130687KMZ_FNParticipantwell, I almost got the desired result myself… the only remaining question would be:
how does the theme gather the posts – where is the routine used for doing this?I have a static page now with a number of posts underneath, it just does not display the
same way as the theme usually does, and I’d like to use the same ‘style’ it did before.January 30, 2018 at 3:04 am #130737KMZ_FNParticipantgot it working myself 🙂
if anyone’s interested:
– (better) get a child theme first, it’s working without… but you wont do any damage like that, so better set up a child first
– get a copy of this code https://pastebin.com/JjkBHR42 and save it as pagewithnews.php into your child theme’s directory.
this will furtheron act as your template to display static content AND news on your front page.
it’s configured to display the last 10 posts, but you can of course change this.
– create a simple page (insert some content) and set it up as your ‘home’page (setting -> reading -> set up as static page -> select this page you’ve just created)
– go to pages to quick edit this ‘home’page and assign the above created template (pagewithnews.php to it)you now should see a static page with the contect you’ve inserted, and underneath the posts should be shown (in case you have some^^)
that’s it 🙂
January 30, 2018 at 3:14 am #130739KMZ_FNParticipantone slight change to the code. the code above only displayed the very last single post, this one will display the last 10.
cheers!
January 30, 2018 at 6:40 am #130756 -
AuthorPosts
- The topic ‘Static Page (Home) & Posts underneath’ is closed to new replies.