Community Forums › Forums › Archived Forums › Design Tips and Tricks › Magazine PRO – Home Page Layout
- This topic has 10 replies, 2 voices, and was last updated 10 years, 5 months ago by Fabio.
-
AuthorPosts
-
November 18, 2013 at 7:25 pm #74092FabioParticipant
Hi there,
so I bought Magazine PRO, and am trying to change some stuff.1) I would like only and exclusively the home page to be sidebar-content-sidebar, and the rest of the website content-sidebar.
How do I set the home page to be different from the rest? (please don't tell me to manually set a different layout for each post and category!)
2) Both home page (sidebar-content-sidebar) and post page (content-sidebar) should fit in my new 960px wrap, which means, the "content" is wider inside the posts than on the home page.
Any help would be so much appreciated!
ThanksFabio
http://site is not live yet!November 18, 2013 at 7:52 pm #74097nutsandboltsMemberTry this in functions.php:
add_filter('genesis_pre_get_option_site_layout', 'custom_home_layout'); function custom_home_layout($opt) { if ( is_home() ) $opt = 'sidebar-content-sidebar'; return $opt; }
If that doesn't work, try this one:
add_filter('genesis_pre_get_option_site_layout', 'custom_home_layout'); function custom_home_layout($opt) { if ( is_front_page() ) $opt = 'sidebar-content-sidebar'; return $opt; }
If neither of those work, finish the bottle and let me know. 😉
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+November 18, 2013 at 8:17 pm #74104FabioParticipantOk Andrea, that did work, but there's another problem!
I have uploaded the same CSS of the site I'm building on one of my test sites so you can see exactly what I see:
http://larecensione.comThe secondary sidebar goes down the content... which is pretty lame 🙂
I am basically trying to get a layout similar to this site:
designrazzi [dot] comThis website has a sidebar-content-sidebar on the home page and content-sidebar on the others.
I suppose this has something to do with padding?? I don't know!Honestly though I did spend a lot of time on Firebug... but I can't find the way to edit it and make it look like the model.
I guess I need some coding classes, but for now could you please help me?Thank you so much!
FabioNovember 18, 2013 at 8:26 pm #74106FabioParticipantOOooops!
I actually forgot something else!
This is my mistake: I have previously written that I wanted only and exclusively my home page to be sidebar-content-sidebar... but I was wrong.
I actually want also all the category archives to be like sidebar-content-sidebar!So that individual posts and pages are content-sidebar
Home page and archives (categories and stuff) are sidebar-content-sidebarJust like in designrazzi [dot] com basically!
Thanks!
November 19, 2013 at 10:04 am #74176nutsandboltsMemberOkay, to force sidebar/content/sidebar for both the homepage and archives, replace what I gave you before with this:
add_filter('genesis_pre_get_option_site_layout', 'custom_home_layout'); function custom_home_layout($opt) { if ( is_home() || is_archive() ) $opt = 'sidebar-content-sidebar'; return $opt; }
As for the left sidebar getting pushed down, it's an issue with the size of the content-sidebar wrap versus some of the other widths. I just switched a test site to Magazine Pro and I don't have that issue as long as I don't use the widgetized homepage - if the homepage just uses blog posts, both sidebars display fine. Did you alter the widths of any part of the theme prior to changing the homepage layout?
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+November 20, 2013 at 12:11 am #74334FabioParticipantHi Andrea and thanks for your help!
So,
I have swapped the code in the functions.php and now it works in both home page and archives. Thank you!About the sidebar being pushed down:
I am not using the widgetized home page, so the one you can see on my test site larecensione.com is the normal blog page.I did change some widths because I do want the wrap to be 960px (I like genesis but not their extra wide layouts).
1) I have swapped 1140px with 960px for the wrap.
2) I have swapped 360px for 300px on the main sidebar (why should someone want a 360px sidebar when all banners are 300px? Mah! Genesis mystery!)
3) I have swapped 750px for 630px for the content in content-sidebarI don't remember if I made any more changes, but I don't think so.
And I also plan to change the second sidebar from 180px to 160px.So that:
For the individual post page, I would like the layout to be:
630px for content + 30px padding + 300px sidebar = 960px
For home page and archive pages:
160px secondary sidebar + 30px padding + 440px content + 30px padding + 300px primary sidebar = 960pxThis is what I'm trying to achieve (which is basically the layout of the model site I mentioned before).
Do you think you can help me?
Thanks a lot!
FabioNovember 21, 2013 at 12:54 am #74668FabioParticipantHi Andrea,
nevermind!I don't need this anymore.
Anyways can I use
add_filter('genesis_pre_get_option_site_layout', 'custom_home_layout'); function custom_home_layout($opt) { if ( is_home() || is_archive() ) $opt = 'sidebar-content-sidebar'; return $opt; }
for any genesis theme? Can I use it on News PRO?
Thank you for your help
FabioNovember 21, 2013 at 12:55 am #74669nutsandboltsMemberYes, that will work for any child theme. I thought of you when I saw that News Pro had been released!
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+November 21, 2013 at 1:02 am #74670FabioParticipantYeah News Pro is perfect for what I need.
Anyways I don't know if I should open another thread about this but...In News PRO, when I edit the font size in style.css,
it only works when I edit the rem size and not when I edit the px size.Is it ok if I only edit the rem size or for some reasons do I need to edit both rem and px?
Fabio
November 21, 2013 at 1:04 am #74671nutsandboltsMemberYou need to edit both. Some browsers don't recognize rem, which is why the px are there as a fallback. It's really easy, though, because the numbers correspond. 2rem = 20px, 1.4rem = 14px, etc.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+November 21, 2013 at 1:11 am #74672FabioParticipantThanks Andrea
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.