Balance Theme "Make left/right widgets static on all pages!

Community Forums Forums General Discussion Balance Theme "Make left/right widgets static on all pages!

This topic is: not resolved

This topic contains 7 replies, has 2 voices, and was last updated by  MLaunch 7 months, 3 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #76391

    MLaunch
    Participant
    Post count: 7

    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,
    Matt

    • This topic was modified 8 months ago by  MLaunch.
    • This topic was modified 8 months ago by  MLaunch.
    http://selling480.com
    #76398

    Kary
    Participant
    Post count: 53

    One 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.

    #76399

    Kary
    Participant
    Post count: 53

    Oh…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

    #76440

    MLaunch
    Participant
    Post count: 7

    Awesome!! 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.com

    • This reply was modified 8 months ago by  MLaunch.
    • This reply was modified 8 months ago by  MLaunch.
    #76774

    Kary
    Participant
    Post count: 53

    Hi,
    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.

    #77117

    MLaunch
    Participant
    Post count: 7

    I 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,
    Matt

    #77328

    Kary
    Participant
    Post count: 53

    I’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.

    • This reply was modified 7 months, 3 weeks ago by  Kary.
    • This reply was modified 7 months, 3 weeks ago by  Kary.
    #77693

    MLaunch
    Participant
    Post count: 7

    I 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..

    example

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.