WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Trying to Add sidebar to pages in addition to post. (5 posts)

  1. theplayahata
    Member
    Posted 7 years ago #

    I am using the Classic theme and I want to add the sidebar that shows on post to show up on the pages i create using the page create feature. I tried to find a thread detailing this but it seemed to pertain to how to do it for a particular theme and other than that the site has been "timing out" a lot at least for the past 3 days when I try to do search using the search box on the support page.
    Any suggestions? I can probably figure it out if I new which file I needed to edit the regular page template.

  2. theplayahata
    Member
    Posted 7 years ago #

    Anyone have any feedback on this issue?

  3. peiqinglong
    Member
    Posted 7 years ago #

    If you edit pages.php and setup the code so it's similar to index.php, you'll have a sidebar.

    Look for this code <?php get_sidebar() ?>, that's the code that calls the sidebar.

  4. theplayahata
    Member
    Posted 7 years ago #

    I found a page.php file under the /wp-admin/ path but that seems to be for the administration page when you are actually creating a page. I also looked under the /wp-content/themes/classic/ but under the 'Classic' theme there is no 'pages.php' file. There is an 'index.php' file and I see an area there where I could tell it to get the sidebar. One weird thing that is happening is that I've created about 10 pages outside the post hierarchy. 7 of the 10 appear to show the sidebar even without making any changes but the other 3 don't and I have no idea why.

  5. theplayahata
    Member
    Posted 7 years ago #

    Go figure it works now and it seems with the Classic theme i didn't need to make any change, or at least not one that I remember. The 3 pages that it wouldn't show on for some reason had some weird scripting info added to the bottom of the pages. Seems it was inserted maybe by my webhost to monitor traffic but i don't think it was working right. Anyway I removed them and now it works for all the pages.

Topic Closed

This topic has been closed to new replies.

About this Topic