WordPress.org

Ready to get started?Download WordPress

Forums

Widget error (1 post)

  1. archmaille
    Member
    Posted 6 years ago #

    Ok I've been trying all night to get my site to work properly with adding widgets to the theme. This is the code I have for my sidebar:

    <div id="sidebar">
    
    			<?php 	/* Widgetized sidebar, if you have the plugin installed. */
    					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    
    <div class="block1">
    
        	<h3>Description</h3>
    <ul>
    <li><?php bloginfo('description'); ?></li>
    </ul>
        	</div>
    
    		<div class="block">
    		<h3>Search</h3>
    		<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
    		<div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
    		<input type="submit" id="searchsubmit" value="Search" />
    		</form>
    		</div>
    
    		<div class="block">
        	<h3>Categories</h3>
        	<ul>
        	<?php list_cats(); ?>
        	</ul>
    
        	</div>
    
            <div class="block">
            <h3>Archives</h3>
            <ul>
            <?php get_archives('monthly','12','custom','<li>','</li>'); ?>
            </ul></div>
    
    		<div class="block">
        	<h3>Blogroll</h3>
        	<ul>
        	<?php get_links('-1', '<li>', '</li>', '<br />', FALSE, 'id', FALSE,
    FALSE, -1, FALSE); ?>
        	</ul>
        	</div>
    
    		<div class="block">
        	<h3>Login/create account</h3>
    
    <ul>
    <?php wp_register(); ?>
    <li><?php wp_loginout(); ?></li>
    	</ul></div>
    
    <div class="block">
    <h3 class="sec-title">Subscribe</h3>
    <ul>
    <li><a href="<?php bloginfo_rss('rss2_url'); ?>" title="Feed for posts">Posts (RSS)</a></li>
    <li><a href="<?php bloginfo_rss('comments_rss2_url'); ?>" title="Feed for comments">Comments (RSS)</a></li>
    
    </ul>
    </div>
    
    	</div>

    Works fine without the widget information, but once the widget thing is added I get this error:

    Parse error: parse error, unexpected $ in /homepages/32/d169432823/htdocs/my_world/wp-content/themes/my-world/sidebar.php on line 67

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags