Community Forums › Forums › Archived Forums › General Discussion › Adding a static section to front page but keeping latest posts underneath
Tagged: blogroll, Static Page, widgets, your latest posts
- This topic has 11 replies, 2 voices, and was last updated 10 years, 2 months ago by nate.
-
AuthorPosts
-
November 11, 2014 at 8:27 pm #131232nateMember
Hi
I have looked through the forum and got so far but not quite - trying to achieve a "static page blogroll combination"
I am using the Eleven40 child theme and my site is http://snowboardingprofiles.com/ - it is currently displaying a static page as the home page.
Following this http://www.studiopress.community/topic/need-static-text-on-blog-page/ I have managed to edit my child themes functions.php - this created a "text before blog" widget area where I could add in what I wanted. So far so good.
The step in the process I can't figure out is how to point the "if( is_page(139) )" part of the code to the Front Page. i.e. if the home page is set to "Your Latest Posts" in Settings>>Reading then does that "Your Latest Posts" have a page number that I can put in place of the 139 in the code?
I can get this to successfully work on a page where I know the number - so for example the new code in the functions.php is currently pointed at my about page and the "static" information that I would like displayed above my blogroll on the front page is displaying on that page how I want it to.
Now I just need to work out how to point it at the front page and have that updating blogroll of "your latest posts" come in underneath. I'm probably missing something really simple here but can't quite figure it out.
I hope I have explained what I mean here correctly.
Any help with this would be very much appreciated.
Sincerely,
NathanP.S. When I go to settings>reading and have a static page as home page and then set my "posts page" to another page and then point the code to that page the "static content" placed in the "text before blog" widget area does not show up.
http://snowboardingprofiles.com/November 11, 2014 at 8:37 pm #131234Genesis DeveloperMemberIf you want then you can try this custom template . You can modify the code little bit and remove the grid view style.
November 11, 2014 at 8:54 pm #131238nateMemberHey - thanks for the quick reply!
I actually really like that with the grids. However I really want the content full width. Would it be possible to adjust the template so that the primary sidebar only started as the blog posts started?
Also (I have some big gaps in my wordpress knowledge!) how do I go about uploading the “template_custom.php” into the child theme folder? Would this need to be done through an ftp server? or is there an easier way? Also when creating the “template_custom.php” is this created in notepad?
And one more question! Where do I add the content for the static content section? Is this just done in the wordpress editor?
Thanks again,
NathanNovember 11, 2014 at 9:10 pm #131239Genesis DeveloperMemberWould it be possible to adjust the template so that the primary sidebar only started as the blog posts started?
You can easily make the full width page using Genesis Layout option which is coming below the WP Editor. But what are you wanting now this is not possible with this template? Your idea is good and I'll try to modify the code and again post here.
Yes. You'll upload the file in your child theme folder via FTP or Cpanel -> File Manager option. You can use Notepad+ and write the code.
Where do I add the content for the static content section? Is this just done in the wordpress editor?
it is page template. SO you will go here Dashboard->Pages->Add new and add the static content in WP Editor, select this new template "Content With Grid Blog Post" from template drop down list and publish the page. That's it. You can setup this page as static home page also if you want.
November 11, 2014 at 9:30 pm #131240nateMemberThanks genwrock - you rock!
I'll have a play around with that tomorrow (brain's a bit fried right now!) and if you do modify the code with a full width content section would be cool if you posted it here.
Your help is much appreciated.
November 11, 2014 at 9:53 pm #131244Genesis DeveloperMemberI think that you are wanting this "Full Width Page Content with Blog Posts"
November 11, 2014 at 10:43 pm #131245nateMemberThanks - that's awesome, will let you know how I get on.
November 11, 2014 at 10:47 pm #131246Genesis DeveloperMemberNovember 12, 2014 at 7:13 pm #131358nateMemberHey
Worked like a charm thanks. So easy after I'd tried so many things that didn't work. Very much appreciate your help.
Now to be a fussy person the only things I would change (but I'm happy as it is) is the layout of the blog posts in the grid.
If I go to http://snowboardingprofiles.com/blog and scroll down to where the blogs begin to go into grid exerts I notice a couple of things that I like that would be great to have on the page template are below - link for the page where I'm using the page template is http://snowboardingprofiles.com/
The theme's original blogroll as per this page http://snowboardingprofiles.com/blog has everything a bit smaller - smaller font, titles are in a smaller font than the full posts, and images are a bit smaller and all of the body text of the exerts come in after the image.
In the page template the blog exerts don't display the post's title and the words sometimes start down the side of the picture and look a little bit messy.
Not sure if that would be an easy fix or not and in any event I am happy with this template and thank for creating it.
What I really do prefer about the template (apart from the main reason - that it does what I need it to do in terms of static content followed by blogroll!) is that it goes straight into the blog exerts and doesn't display a full blog first like it does on the themes original blogroll.
Thanks again genwrock and keep up the good work,
NathanNovember 12, 2014 at 7:40 pm #131359nateMemberJust noticed the part on your post that talks about the CSS Tweak - would that change anything and how do I add that if I needed to?
November 13, 2014 at 1:51 pm #131452nateMemberI tried adding the CSS tweak but this made no noticeable difference in the appearance on my theme.
If anyone has any ideas on how to tidy up the blog exerts that would be awesome.
Sincerely,
NathanNovember 21, 2014 at 10:06 pm #132467nateMemberBelow is the home.php in my theme (Eleven40 Theme). I assume that this is what instructs the theme's blogroll when home page is set to “Your Latest Posts” in Settings>>Reading. How this looks is here http://snowboardingprofiles.com/blog for my site.
<?php //* Add Genesis grid loop remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action( 'genesis_loop', 'eleven40_grid_loop_helper' ); function eleven40_grid_loop_helper() { if ( function_exists( 'genesis_grid_loop' ) ) { genesis_grid_loop( array( 'features' => 1, 'feature_image_size' => 0, 'feature_image_class' => 'alignleft post-image', 'feature_content_limit' => 0, 'grid_image_size' => 'grid-featured', 'grid_image_class' => 'grid-featured', 'grid_content_limit' => 250, 'more' => __( '[Continue reading]', 'eleven40' ), ) ); } else { genesis_standard_loop(); } } //* Run the Genesis loop genesis();
In order to get the posts in the new page template to look like the ones in the grid on that page I have experimented with inserting some of this into the custom theme template. However, I am not good with code and it was a bit haphazard to say the least! I got it to do some different things but not things that I was trying to achieve.
If anyone knows how I can get the blog posts to show in the grids like they do on http://snowboardingprofiles.com/blog on my home page here http://snowboardingprofiles.com/ that would be super awesome!
Sincerely,
Nathan -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.