Cannot hide sidebar when creating custom page template

  • foxhunter

    #7322

    I am trying to make a custom page template so I can embed some JavaScript in the actual page. (Only way to get the results of a query to show.)

    I have followed all the main template guides online, but cannot figure out how to get the sidebar to stop showing. I want to make a duplicate of the single column page template, just with some added JS.

    foxhunter

    #37825

    Update:

    I have copied the entire contents of loop-page.php to a new template file. Apparently the sidebar is part of the footer code, so I removed

    get_footer();

    from the bottom and that did away with the sidebar. (and the footer, but that is doable, I guess)

    I commented out the

    ‘ <?php //the_content(); ?> `

    and put my javascript below that.

    Now the sidebar does not show, but the area where the sidebar was is still there. I need the content section to be 100% width, but cannot figure out how to do that. Ideas?

    Admin

    Syahir Hakim

    #37826

    Can you just put the JavaScript code into the page content itself just like any other content, but using code view in the WordPress’ Edit Page screen?

    foxhunter

    #37827

    Unfortunately, no. I do not know enough about JavaScript to explain why it doesn’t work, but I need to create a template page to do this.

    Admin
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.