Community Forums › Forums › Archived Forums › General Discussion › Blog page as the main Landing page
Tagged: blog
- This topic has 6 replies, 2 voices, and was last updated 7 years, 11 months ago by Tonya.
-
AuthorPosts
-
April 28, 2016 at 4:31 am #184590westerdaledMember
Hi
Following the my Theme's instructions, I have created the empty Blog page based on the Blog Template. If I want to make this the main landing page and also only show posts that have certain categories then
I guess I am looking at Option 3 here: creating a blog page with paging . anybody done anything different or had issues with Option 3?
Begards
Daniel
April 28, 2016 at 8:44 am #184605TonyaMemberHello Daniel,
I'll work up a walk-through lab that thoroughly explains the code, what it does, and why it works. But for now, here is what you need: code on GitHub. You want to put this home template into your child theme. It will no longer use the Blog template.
Does your child theme have a front-page.php template file in it? If yes, then go to Settings > Reading > Click on "A static page (select below)" radio button > Then select your Blog page in the Posts page: selector. Then click on the "Save Changes" button. If no, then you can either set the Front page displays option to (1) Your latest posts or (2) do what I said to set your Blog page to the static one for Posts page. Do not have a Front page selected though.
Next go to Genesis > Theme Settings and scroll down to Blog Page Template. You can now set the options that you want for your home page including what category you want to display versus the ones you do not.
Happy Coding,
Tonya
Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer BootcampApril 28, 2016 at 10:01 am #184619westerdaledMemberHi Tonya
Thanks for a quick response, My current Theme is Metro Pro and yes, it does have front-page.php
I have download the code from Github and it is now open in Notepad++ ( and FIleZilla connected to my blog) . Do I replace front-page.php with it? Can you please explain You want to put this home template into your child theme. It will no longer use the Blog template."
what is the file name for this code.My settings - Reading -> Front Page displays
() Your Latest Posts
() A Static page <- here I can click on the link and can select any page inc the my orginal blank blog post page ( created with the original blog page template)
BTW pity this forum doesn't have the ability to upload screen dumps like MSDN , so much easier to explain stuff.
Daniel
April 28, 2016 at 5:16 pm #184644westerdaledMemberHi
I had another look at this tonight and I still can't figure where you would put the code from GIthub . Front-Page.php has additional stuff like handling the sidebars so not readily placed and I assume it isn't a site plugin ( have written a couple of those now) .. Hence, I am stuck ;-(
Daniel
April 28, 2016 at 10:50 pm #184658TonyaMemberHello Daniel,
Sorry I was gone today.
Here are the steps:
- The code that I provided to you is labeled as home.php. This is the name of the file that you want to use in your child theme.
- As for the front-page.php file, either rename it as _front-page.php. You are no longer using it. You are renaming it just in case you decide that you want it again in the future.
- The Blog page you created, you can delete it too, as you no longer need it.
- In Settings > Reading > Front page displays -> click on the "Your latest posts" and then click on "Save Changes"
- Go to Genesis > Theme Settings > Blog Page Template -> setup the categories the way you want and set the number of posts you want on the new home page.
Let me know if you have questions. Cheers,
Tonya
Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer BootcampMay 2, 2016 at 3:21 pm #184839westerdaledMemberTonya
Thanks for your reply. I too was away ( on a Welsh mountain) so only just got WIFI tonight
Yes, followed your instructions and it worked perfectly. Quite neat the way you have hooked into the Genesis framework using the Custom Genesis Loop.
Thanks again.
Daniel
May 6, 2016 at 9:44 am #185102TonyaMemberHey Daniel,
You are very welcome. Glad to help you out.
Cheers,
Tonya
Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer Bootcamp -
AuthorPosts
- The topic ‘Blog page as the main Landing page’ is closed to new replies.