• # December 30, 2012 at 11:18 pm

    Hi all,

    I’m working on a site with a three column layout, with the page title covering the first two columns, then the third floated up next to the page title. I have the new sidebar set up in my functions.php, the issue I’m having is that I need the sidebar within the entry-content div ONLY on static pages.

    I’ve tracked down the area I need to edit in the content.php, and [have pasted it here]( “”).

    I can’t figure out how to get this to work, I keep getting various syntax errors. In the paste above, I also included my most recent attempt..also gave me a syntax error.

    # December 31, 2012 at 1:22 am

    @ChrisP Paste the error you’re getting.

    # December 31, 2012 at 6:04 am

    This reply has been reported for inappropriate content.

    For the attempt I put in that paste, I get an error of

    Parse error: syntax error, unexpected $end in /public_html/wp-content/themes/my-theme/content.php on line 69

    There’s no $end on line’s a paste of the entire content.php

    # December 31, 2012 at 9:37 am

    This reply has been reported for inappropriate content.

    Just to clarify, the only time I receive the parse error is on the blog feed page. The static pages have the second sidebar and the posts do not have the second sidebar, so everything is as it should be except for that parse error on the blog feed.

    # January 2, 2013 at 10:02 pm

    This reply has been reported for inappropriate content.

    I figured it out, in case anybody else stumbles across this thread, I just wrapped the sidebar div in a basic if ( is_page() ) { }..thought I tried that earlier and it didn’t work, but it seems to be working now.

    # January 3, 2013 at 12:03 am

    The error you’re getting was due to your syntax somewhere in the code (not closing a parenthesis, semicolon, etc.).

    # January 3, 2013 at 8:30 am

    This reply has been reported for inappropriate content.

    @chrisburton, I think it had to do with the fact that I was just trying to copy and paste the if/else statements elsewhere in the php. I don’t do much php scripting, but I think it had to do with my attempt to use a colon instead of curly was ruining my syntax, and I’m not skilled in PHP enough to figure out how to properly sort it out

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.