Community Forums › Forums › Archived Forums › General Discussion › Balance Theme "Make left/right widgets static on all pages!
Tagged: Balance, home page, Left & Right Widget areas
- This topic has 7 replies, 2 voices, and was last updated 10 years, 4 months ago by MLaunch.
-
AuthorPosts
-
November 30, 2013 at 11:45 pm #76391MLaunchMember
Hello,
I would prefer the left/right widgets (the way they appear now at selling480.com) to appear on every page/post. Like the footer widgets that appear static and never move. Right now they show on the home page as long as I leave it set to blog posts. I want the home page to be a static page but want those widget areas to appear throughout the site..
I've seen similar questions throughout the forum but nothing that answers this..
Thanks,
http://selling480.com
MattDecember 1, 2013 at 1:44 am #76398KaryMemberOne thing you could do is recreate the content of the current home.php page and name it something else. This is important in case you want to go back to the original way the theme works.
At the top of the page, currently the code is written:
<?php add_action( 'genesis_meta', 'balance_home_genesis_meta' ); /**
Make certain you add the following to the top under the beginning PHP tag:
<?php /* Template Name: WidgetPage */ add_action( 'genesis_meta', 'balance_home_genesis_meta' ); /**
This will create a new template page that you can use for all of your website's pages. You will not be able to choose this for your blog post pages.
Where it says 'WidgetPage' you can name it anything you like.
Now, whenever you create a new page and want those widgets to appear on the page, choose this template from the drop-down list under Page Attributes for that page.
To make sure everything appears correctly, create a new static page and name it Home, or whatever. Make certain this page has the template chosen above. Create a second page and name it Blog. Make certain to choose BLOG as the template page.
You'll then need to go into the Admin area > Settings > Reading
At the top of the page, select the radio button for STATIC PAGE and choose front page = HOME
and posts page = BLOG.When you create your menu, make certain you provide links to your BLOG page and your HOME page of your website.
Hope that helps.
December 1, 2013 at 1:58 am #76399KaryMemberOh…one thing I should add. If you want those widgets to appear on your blog's index page, then leave the page's name alone. It's current name is home.php. Leave it that name and those widgets will appear on the index page of your blog. (Not the single post pages).
If you don't want those widgets to appear on the index page of your blog, then rename the home.php page. You could simply name it to something like home-old.php
December 1, 2013 at 10:38 am #76440MLaunchMemberAwesome!! Thanks Kary.
A few things though, I can get the widget areas to pop up on every page now, but I'm having a few problems.
1- It works great on the Blog page, but I would also like the widget areas to appear on single blog post pages..
2- Is there a way to make that page template expand the full width of the screen (in case I change the background color) to follow suit like the above widget areas. Keeping the content centered in the middle though..
I appreciate your help!!
Thanks,
Matt
selling480.comDecember 3, 2013 at 1:38 am #76774KaryMemberHi,
Glad it worked for you.
(1) To make the widgets appear on the single post pages, you'll have to do some major editing of the theme. You'll need to read some tutorials on how to do that and add a new page in your child theme's folder as you can't change the genesis core. If that's more than you care to do, what would work is creating a widget and place it in the blog's sidebar. You can style the widget using CSS to look similar to the one at the top. You can turn on JetPack and use the feature where you can show/hide widgets on certain pages/posts. When you have the widget created, just make certain you hide it on all pages. That way, it will only appear on the sidebar of single posts. (I think that will work. You might have to play around with that until you get it showing where you want it and not showing everywhere else.).(2) I'm not sure what you mean here. When I look at your site, the gray bar run's 100% across the page no matter how wide the browser window and the content is always centered. The color of that gray bar is #333333 in the CSS.
December 4, 2013 at 9:42 pm #77117MLaunchMemberI meant the content area below the widget area with the grey background. Is there a way to make it full screen 100%, and center the content in the middle just like the widget areas above do?
Thanks,
MattDecember 6, 2013 at 3:56 am #77328KaryMemberI'm still not 100% clear what you mean so what I *think* you mean might actually be an insult to your question. If this isn't what you meant, just disregard.
The content area will be as large/long as the content you have created there. So if you want to add content to the static page you created named HOME, just type your content and it will appear and your page will be as long as needed to accommodate it. If you want it longer, the best I can say is to create a DIV in the HTML editor for that page and give that div a class name.
Add that class to your CSS and give it a min height of whatever amount you want. For example,
.homeDiv { min-height:500px; }
As an aside, if you don't want the header text to appear in the content area of your homepage, you can add this to your CSS…
.post-572 h1 { display:none; }
That's a simple hack and can probably be fixed in a better way. But it works as long as you don't delete the current homepage and create a new one. The number 572 is referencing that specific page's H1 tag. Also, no other H1 tag would appear on that page as long as you have that class on your CSS page. So if you need a better fix, you'll have to edit the code.
December 8, 2013 at 10:19 am #77693MLaunchMemberI apologize, I will clarify. I was attempting to make the content areas background 100% (horizontally) like the left/right widgets appear.
Purpose:
If I put a slider in the content area I would like the background to stretch the entire screen left to right.
Or a static image as the background stretch left to right.IF you look at the image below I simply changed the background to #000000 and it fills the 960px for the content area but ends there. I would prefer it stretch the full page..
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.