WordPress.org

Ready to get started?Download WordPress

Forums

Easel
[resolved] Remove right side bar ONLY on certain pages and expand width of content? (32 posts)

  1. mnm82
    Member
    Posted 1 year ago #

    Hi,

    On the Easel template it has a right side bar that I only want displayed on the home page, not every page. Also the content area in between both sidebars I want to expand out to the end border of where the side bar would be. I found this code online but either it does not work or I am doing it wrong :/

    http://wordpress.org/support/topic/remove-sidebar-in-certain-pages?replies=7

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Have you already created & activated a child theme?

  3. mnm82
    Member
    Posted 1 year ago #

    No, I have not. Is this the route I need to go in order to do this? I'm clueless :/

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    Yes, it is. Otherwise you will lose of of your customisations when you update the theme. The link I posted above should give you the details you need to create your new child theme.

  5. Frumph
    Member
    Theme Author

    Posted 1 year ago #

    ^ as soon as you create your child theme, so you don't lose your customizations; copy the layout-foot.php from the main theme into the child theme directory.

    Edit the layout-foot.php search for:

    if (easel_is_layout('2cr,3c,3cr')) easel_get_sidebar('right');

    and change it to:

    if (easel_is_layout('2cr,2crw,3c,3cr') && is_home()) easel_get_sidebar('right');

    Then, in your child themes style.css file (which doesn't have anything inside of it right now except the @import) you add this:

    .narrowcolumn {
    	width: 750px;
    }
    
    body.home .narrowcolumn {
    	width: 550px;
    }

    Which will make it so that on all pages use 750px width on the narrowcolumn (content section) BUT overwrite that on body.home (home pages) to be 550px;

  6. mnm82
    Member
    Posted 1 year ago #

    OK. So I finally got a child theme installed by converting it to zip file (not just creating folder in directory). Now I an getting a page with the following message on the bottom on page:

    Parse error: syntax error, unexpected '}', expecting T_STRING or T_VARIABLE or '$' in /home/artattac/public_html/fl/wp-content/themes/easel-child/layout-foot.php on line 9

    I have the child theme folder with a style.css that looks like this:

    /*
    @import url("../easel/style.css");
    Theme Name:     Easel Child Theme
    Theme URI:      http://artattackfx.com/fl
    Description:    Child theme for the Easel theme
    Author:         mnm82
    Author URI:     http://artattackfx.com/fl
    Template:       easel
    Version:        3.5.1
    */
        width: 750px;
    }
    
    body.home .narrowcolumn {
            width: 550px;
    }

    AND

    The layout-foot you mentioned to change that looks like this:

    <?php if (!easel_sidebars_disabled()) easel_get_sidebar('under-blog'); ?>
    		</div>
    		<div id="content-foot"></div>
    <?php
    if (!easel_is_signup() && !easel_sidebars_disabled()) {
    	if (easel_is_layout('3cl,3cr')) easel_get_sidebar('left');
    	if (easel_is_layout('2cr,3c,3cr') && is_home()) easel_get_sidebar('right');
    
    }
    ?>
    		<div class="clear"></div>
    	</div>
    	<div id="subcontent-wrapper-foot"><?php do_action('easel-subcontent-wrapper-foot'); ?></div>
    </div>
    <div id="content-wrapper-foot"><?php do_action('easel-content-wrapper-foot'); ?></div>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    Everything is aligned left,Left menu is as wide as the page and Right menu no where to be found.... Am I supposed to copy ALL of the .php files from original if I am trying to achieve the same look?

  7. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    You have some problems in the style.css file - change it to this:

    /*
    Theme Name:     Easel Child Theme
    Theme URI:      http://artattackfx.com/fl
    Description:    Child theme for the Easel theme
    Author:         mnm82
    Author URI:     http://artattackfx.com/fl
    Template:       easel
    Version:        3.5.1
    */
    
    @import url("../easel/style.css");
    
    body.home .narrowcolumn {
            width: 550px;
    }

    Make sure you clear your browser cache after changing that file.

  8. mnm82
    Member
    Posted 1 year ago #

    Alright, I need serious help :(

    What does this mean? Nothing is showing up...

    Fatal error: Cannot redeclare easel_setup() (previously declared in /home/artattac/public_html/fl/wp-content/themes/easel-child/functions.php:63) in /home/artattac/public_html/fl/wp-content/themes/easel/functions.php on line 88

  9. esmi
    Forum Moderator
    Posted 1 year ago #

    You cannot copy a function from the parent theme into the child. If you need to amend the function's output, you'll need to look at another approach - such as using a filter. I'm not that familiar with Easel, so I can't give you any specifics, I'm afraid.

  10. mnm82
    Member
    Posted 1 year ago #

    After finally getting a child them uploaded I tried to re-do and now its telling me

    "The theme is missing the style.css stylesheet."

    This is my style sheet and the only thing I have in my child folder:

    /*
    Theme Name: Easel Child Theme
    Theme URI: http://artattackfx.com/fl
    Description: Child theme for the Easel theme
    Author: mnm82
    Author URI: http://artattackfx.com/fl
    Template: easel
    Version: 3.5.1
    */
    @import url("../easel/style.css");
    .narrowcolumn {
    width: 750px;
    }

    body.home .narrowcolumn {
    width: 550px;
    }

    I then zip this file to upload as a Theme because it does not just show up in themes automatically like all the tutorials say it should :/

    Spending Hours trying to figure this out. What am I doing wrong?

  11. Frumph
    Member
    Theme Author

    Posted 1 year ago #

    What is the name of the zip file, what is the name of the file inside the zip file? is it style.css ?

    Are you able to FTP into your hosting? using an FTP program like winscp ?

  12. mnm82
    Member
    Posted 1 year ago #

    Zip file = easel-child

    File inside zip file = style.css

    Using FileZilla

  13. Frumph
    Member
    Theme Author

    Posted 1 year ago #

    well just FTP into your wp-content/themes/easel-child/ directory, check whats there, if nothings there ftp over that style.css you created, also copy over the layout-foot.php as explained above

    If you are using the default style you should probably import that as well directly under the other import

    @import url("../easel/style-default.css");
  14. mnm82
    Member
    Posted 1 year ago #

    I cant drag and drop the child folder onto my ftp?

    On my Desktop:

    1. I have the WP Install Folder
    2. I have the child them folder in the "wp-content/themes" folder
    3. In the child folder I have style.css looking like this:

    /*
    Theme Name: Easel Child Theme
    Theme URI: http://artattackfx.com/fl
    Description: Child theme for the Easel theme
    Author: mnm82
    Author URI: http://artattackfx.com/fl
    Template: easel
    Version: 3.5.1
    */
    @import url("../easel/style-default.css");
    
    .narrowcolumn {
    width: 750px;
    }
    
    body.home .narrowcolumn {
    width: 550px;
    }

    and the layout-foot looking like this:

    <?php if (!easel_sidebars_disabled()) easel_get_sidebar('under-blog'); ?>
    		</div>
    		<div id="content-foot"></div>
    <?php
    if (!easel_is_signup() && !easel_sidebars_disabled()) {
    	if (easel_is_layout('3cl,3cr')) easel_get_sidebar('left');
    	if (easel_is_layout('2cr,2crw,3c,3cr') && is_home()) easel_get_sidebar('right');
    }
    ?>
    		<div class="clear"></div>
    	</div>
    	<div id="subcontent-wrapper-foot"><?php do_action('easel-subcontent-wrapper-foot'); ?></div>
    </div>
    <div id="content-wrapper-foot"><?php do_action('easel-content-wrapper-foot'); ?></div>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    I then try to drag the "easel-child" folder into the FTP site "themes" folder where the original "easel" theme is located as well.

    It does not let me drop files in. Not as originals, not in a folder and not even as a zip.

    Alternative:

    I upload the .zip file through Dashboard... "install themes" upload and I still get the following:

    Installing Theme from uploaded file: easel-child.zip
    Unpacking the package…

    Installing the theme…

    The package could not be installed. The theme is missing the style.css stylesheet.

    Theme install failed.

  15. Frumph
    Member
    Theme Author

    Posted 1 year ago #

    .. not my problem about not being able to drag folders over, need to contact your hosting on that.

    Could be an ftp ownership permission issue that they would have to fix.

  16. mnm82
    Member
    Posted 1 year ago #

    Sorry, Not blaming you, just trying to get advice if I was doing something wrong :( Thank You.

  17. Frumph
    Member
    Theme Author

    Posted 1 year ago #

    No you're doing everything correct, but it seems since you can't copy files to your server via FTP that would be an issue with your hosting.. probably not having permissions to write directories.. or files in those directories, to which case you need to talk to your hosting

  18. mnm82
    Member
    Posted 1 year ago #

    I have my previous issues resolved! I successfully created a child theme and WP recognized right away. I brought in the menu bar (left) and expanded the width of the content area, like I wanted, but I need help having the right side menu bar show up. I have an image widget under the right side bar but its not showing up.

  19. Frumph
    Member
    Theme Author

    Posted 1 year ago #

    you wrote that you didn't want the right sidebar on anything but the home page... you're saying it's not showing up on the home page?

  20. mnm82
    Member
    Posted 1 year ago #

    That's right. I ONLY want the right side bar on the home page but it's not showing up on the home (or any where else)...

  21. Frumph
    Member
    Theme Author

    Posted 1 year ago #

    did you write this line correctly? in the layout-foot.php file?

    if (easel_is_layout('2cr,2crw,3c,3cr') && is_home()) easel_get_sidebar('right');

    ?

    IF you are using an alternate page on the home page then you would need to use is_front_page(), let me rewrite that line

    if (easel_is_layout('2cr,2crw,3c,3cr') && (is_home() || is_front_page())) easel_get_sidebar('right');

    There, that will make it so that people who use a static page as the front page it will work with.

  22. mnm82
    Member
    Posted 1 year ago #

    Almost there :)

    The "front_Page" was the one I needed. It's showing up on the right side ONLY if my content area is the original 550px. I want the content area to stay at 760px for all pages and have the side bar still on right ONLY for front page.
    Thanks.

  23. Frumph
    Member
    Theme Author

    Posted 1 year ago #

    soo uh, you want your front page wider then all of the other pages? cause that will happen ifyou keep the width and also add the sidebar ..

  24. Frumph
    Member
    Theme Author

    Posted 1 year ago #

    .. You probably don't have this correctly in your style.css of your child theme maybe

    .narrowcolumn {
    	width: 750px;
    }
    
    body.home .narrowcolumn {
    	width: 550px;
    }

    Keep it in that order.

  25. mnm82
    Member
    Posted 1 year ago #

    I have that same above code in the child theme.

    So, can I maybe get the FIRST page to stay at 550px so the side bar can come up and THEN have all the OTHER pages at 760px with NO Right side bar? Is this possible?

    The thing is that I need the other pages to be no less then 760px because then the content looks squeezed in. The home page can stay at 550px because there is not alot of content but the other pages won't look good if they are 550px as well...

  26. Frumph
    Member
    Theme Author

    Posted 1 year ago #

    .. well that code above shoulda let you have that.

    Maybe if you linked your site I can clean up the CSS and relay what you need CSS wise to make it look good?

  27. mnm82
    Member
    Posted 1 year ago #

    Yea, the code above lets me change the width of the body.home like I like but it effects all pages. Here's my link:

    http://www.artattackfx.com/fl

  28. Frumph
    Member
    Theme Author

    Posted 1 year ago #

    Man, you shoulda told me you with with the art's, I go OUT of my way for things like that.

    Contact me via my email (contact button on my http://frumph.net/) site.

  29. mnm82
    Member
    Posted 1 year ago #

    I tried contacting you thru FB last time... the contact button on the Frumph.net site isn't linking to anything. FB request sent by Melissa..

  30. Frumph
    Member
    Theme Author

    Posted 1 year ago #

    ah, if you tried to 'add me as friend' and I don't know you I generally decline.. but if you message me via facebook, which I haven't gotten anything from anyone recently, that would probalby have worked (without adding as friend) email: philip @ frumph dot net

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic