Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Help Fix my Sidebar Please

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #36153
    smithaa99
    Member

    Hey, I’ve been working on this site for a bit

    – My client has requested that I make a separate template for the first page so the main content area and the sidebar are not as tall/long.

    I achieved that with the main content area, but had tried pasting in the code I had in the sidebar.php file, in place of get_sidebar(), and it makes 2 duplicate sidebars instead of 1 static sidebar.

    I want to set a custom div for the sidebar in the index, so that it becomes shorter.

    I have already enabled a JS script that makes both the main-content and the sidebar’s heights equal to eachother, so that’s not the issue, the dynamic PHP stuff is.

    Your help would be greatly appreciated!

    Thanks!
    Adam

    #94766
    TheDoc
    Member

    Hey Adam – you’re going to have to post some code for us to look at!

    #94787
    smithaa99
    Member

    This is the index code:
    http://www.onedollaronebrick.org

    
    /*
    Template Name: One Dollar, One Brick: Home
    */

    get_header(); ?>


    All It Takes Is One Dollar.









    '' . __( 'Pages:', 'twentyten' ), 'after' => '' ) ); ?>










    #94788
    smithaa99
    Member

    Sidebar PHP Code:




    And here’s the style sheet:
    http://www.onedollaronebrick.org/style.css

    #94789
    TheDoc
    Member

    Create a new file called sidebar-home.php. Then on your home template (which shouldn’t be index.php, by the way) you can use get_sidebar(‘home’).

    #94793
    smithaa99
    Member

    http://www.onedollaronebrick.org

    This is what happens, even when I insert the get_sidebar(‘home’) and created a sidebar-home.php file

    #94794
    jamygolden
    Member

    That is happening because you’re either calling


    Together or because your sidebar-home.php contains duplicate code.

    #95139
    smithaa99
    Member

    Is there a way to figure out where the PHP code is that’s calling the sidebar twice?

    I don’t see two times

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Back End’ is closed to new topics and replies.