Forums

Help removing all sidebar and footers from Full Page Posts (3 posts)

  1. empulse
    Member
    Posted 10 months ago #

    I'm sure there is a simple solution here. . . . But I just can't figure it out I'm very much a WP rookie, so bear with me =)

    Through extensive studying of the WP Codex, and help from a member on this forum, I've managed to create a custom template for a few pages and get everything worked out with it. . . Each page pulls in the 2 latest posts from a given category. I figured out how to use excerpt to limit the words so the appearance is nice on the PAGE. Where I run into an issue is when a reader clicks the title of the post and goes to the specific post's full page.

    This full page has both a Footer and a sidebar.

    I just want the Post to appear in its entirety with nothing but the header. I want to make the footer and the sidebar go away. On every single page. I'm sure there is a better way of doing this than deleting everything out of footer.php and sidebar.php and leaving them blank, right?

    Thanks in advance!

  2. empulse
    Member
    Posted 10 months ago #

    So I just found where it's all going down. . . single.php

    When I delete the lines everything goes away that I want gone. I can't def do that. . . Easy fix =)

    But for the sake of preservation, is there an easy way to comment things out in the WP editor? //, #, and /* seem to all be unrecognized and appear on my page like normal text.

  3. dragonsjaw
    Member
    Posted 10 months ago #

    You don't mention what theme you are using.
    You're not using a child theme?
    If you were, you would make a copy of single.php with the changes you want (take out the call to footer and sidebar) and put it in your child theme folder. It would be called before the 'parent' theme.

    You could comment it out in the single.php file, knowing that if its a theme that gets updated/upgraded, your changes will have to be done again.

Reply

You must log in to post.

About this Topic