Forums

[resolved] Parse Error on Conditional Sidebar (1 post)

  1. jtancil@yahoo.com
    Member
    Posted 6 months ago #

    Hello,
    I am a php muddlehead. I am trying to make a conditional sidebar. So, if it is on the "Investment Team" page, the visitor will see a special sidebar; on all other pages, they will see the usual sidebar.

    I get this error: Parse error: syntax error, unexpected T_VARIABLE, expecting ':' in /data/15/1/58/53/1384705/user/1485754/htdocs/lionpr/wp-content/themes/lionpress/sidebar.php on line 25

    The code I used is below.

    Thank you for any help!
    Jeff

    <div id="secondary" class="widget-area" role="complementary">
            <ul class="subnav">
            <?php
    if ( is_page('investment-team') ) {
        echo "testing";
    
    }?>
     <?php
                        elseif($post->post_parent)
                        $children = wp_list_pages('title_li=&child_of='.$post->post_parent.'&echo=0'); else
                        $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
                        if ($children) { ?>
                        <?php echo $children; ?>
          <?php } } ?>
    
    			</ul><!--end sub-nav-->
    		</div><!-- #secondary .widget-area -->
    <?php endif; ?>

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 6 months ago by jtancil@yahoo.com
  • This topic is resolved
  • WordPress version: 3.2.1