Small problem while splitting up the files of a completed WP Theme

Discussion in 'WordPress' started by pipes, Jul 27, 2008.

  1. #1
    Hi, ive created my third WP theme, but when i reach the stage of splitting index.php into individual files, ie: header.php footer.php sidebar.php for some reason i always get a problem with the sidebars once i put the code into sidebar.php files so i end up leaving the sidebar code in the index file but i dont want to do that.

    I have a 3 colunm theme, 2 sidebars.

    leftsidebar
    rightsidebar

    So after adding them to their own php files i use <?php get_sidebar('leftsidebar'); ?> and <?php get_sidebar('rightsidebar'); ?>

    Note: i found the code Here

    But the theme then becomes messed up, header and footer never give me this problem, only when trying to move the sidebar code into their own php files.

    Any ideas ladies and gents?
     
    pipes, Jul 27, 2008 IP
  2. mizaks

    mizaks Well-Known Member

    Messages:
    2,066
    Likes Received:
    126
    Best Answers:
    0
    Trophy Points:
    135
    #2
    Exactly how is it messing up the layout?
     
    mizaks, Jul 27, 2008 IP
  3. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #3
    First it was making everything but the header disappear, and over the space of about half an hour i tried various things but it was knocking them out, the container and right sidebar pushed down, the css appearing like it was not being read properly for the left sidebar so that the text was all bunched together.

    Quite strange because im trying nothing more than just trying to split the files up and i always hit a problem when it comes to adding the sidebars into their own files at the end.

    Ive placed the sidebar code back into index and everything shows correctly as normal, but i really want to find out what is causing this each time i attempt it with the sidebars.
     
    pipes, Jul 27, 2008 IP