• Resolved gandrew55

    (@gandrew55)


    I know this is very basic, but I need a bit of help…
    I am adding Forums to my blog, The Discerning Photographer, (theme is Mimbo 3.0) and I
    need to remove the sidebar from the new Forum page:
    https://thediscerningphotographer.com/forum/

    I tried duplicating my page.php file and simply removing the line that calls the sidebar; this errored out the whole page.

    Any simple instructions about how to proceed greatly appreciated!!

Viewing 15 replies - 1 through 15 (of 22 total)
  • Does your theme have a single column layout by chance? When you are editing a page, you can select the layout via drop down menu on the right.

    copy page.php, rename copy as page-forum.php or page-ID.php, where ID is id of the forum page, and remove the line with <?php get_sidebar(); ?>.

    Thread Starter gandrew55

    (@gandrew55)

    My theme does NOT have a single-column layout in the pulldown list.

    And Andrei, I did what you suggested–at least I think I did, although I called it fullwidth.php, created using Dreamweaver with a simple copy and paste but adding these five lines to the top:

    <?php
    /*
    Template Name: Full Width Template
    */
    ?>

    I took out the

    <?php get_sidebar(); ?>

    and saved out my changes and uploaded to my theme, producing the error.

    Thread Starter gandrew55

    (@gandrew55)

    Here’s the page as it is now, but producing the errors:

    [code moderated - please follow the forum guidelines for posting code]

    try this..

    [code moderated - please follow the forum guidelines for posting code]

    i just remove the

    if (have_posts()) : while (have_posts()) :

    It works just fine. What kind of errors?

    Thread Starter gandrew55

    (@gandrew55)

    Here’s what it’s doing: when I go to the Page, go to Edit, use the pulldown and choose ‘Full Width Template’, Update my changes and go to ‘View Page,’ it returns a page that just displays all of
    the php coding for the page, rather than producing the actual page…

    It works just fine. What kind of errors? — Andrei Olsen

    yep, fine for me either..

    displays all of the php coding for the page

    what do you mean by that?

    Thread Starter gandrew55

    (@gandrew55)

    I mean that when I click on the tab for the page, I don’t get the page displayed. I get all of the php coding displayed, as if I was in the theme editor.
    When I switch the page over the the ‘Default’ template, with the sidebars I don’t want, the page displays properly.

    Thread Starter gandrew55

    (@gandrew55)

    This link shows what I’m getting:
    https://thediscerningphotographer.com/forum/

    Maybe Dreamweaver messed up and interpreted php code as html markup and changed it so. I hope you pasted the code in code view and not visual/wysiwyg mode.

    Did you try opening and editing php file with notepad or another editor ( like vim or notepad++. The last one would probably be better for you)?

    Thread Starter gandrew55

    (@gandrew55)

    Andrei,
    Thanks! Partial resolution of my problem. I tried working directly in my page-forum.php file and simply doing an ‘Update File’ and now it’s properly showing the page!
    HOWEVER: It’s still only using the 620 px of the 920px that Mimbo defines. This is the width of the ‘Content’ in the stylesheet.

    Here’s a link to the entire Mimbo stylesheet:
    https://pastebin.com/ce1gg3N9

    Is there a way I can define something different for my page-forum template?

    Thanks to all who have contributed to this, I really appreciate your help.

    Just add #post-4038 { width:910px; } to your stylesheet.

    or this..

    .page-template-page-forum-php #content{width: 910px !important;}

    You don’t need !important there.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘How to Create New Page Template without Sidebar’ is closed to new replies.