Link to home
Start Free TrialLog in
Avatar of dmullis
dmullisFlag for United States of America

asked on

Wordpress 3.2.1 Widgets will not move to side bar

I've created all the php for my custom wordpress theme , but when I go into the appearance sidebar add widget. The widgets will not move. I am using  wordpress version 3.2.1.

This is my sidebar code.

<div class="sidebar">
 
 <?php if ( !function_exists('dynamic_sidebar')
       || !dynamic_sidebar() ) : ?>
  <ul>
    <li id="search">
      <?php include(TEMPLATEPATH . '/searchform.php'); ?>
    </li>
    <li>
      <h2>
        <?php _e('Archives'); ?>
      </h2>
      <ul>
       <?php wp_get_archives('type=weekly'); ?>
      </ul>
    </li>
 
      
    <li>
      <h2>
        <?php _e('Categories'); ?>
      </h2>
      <ul>
        <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
      </ul>
    </li>
   
    <?php get_links_list(); ?>
    <li>
      <h2>
        <?php _e('Meta'); ?>
      </h2>
      <ul>
        <?php wp_register(); ?>
        <li>
          <?php wp_loginout(); ?>
        </li>
        <?php wp_meta(); ?>
      </ul>
    </li>
  </ul>
</div>

please advise why my widgets will not move to the sidebar.
<div class="sidebar"> 
 
 <?php if ( !function_exists('dynamic_sidebar')
       || !dynamic_sidebar() ) : ?>
  <ul> 
    <li id="search"> 
      <?php include(TEMPLATEPATH . '/searchform.php'); ?> 
    </li> 
    <li> 
      <h2>
        <?php _e('Archives'); ?>
      </h2> 
      <ul> 
       <?php wp_get_archives('type=weekly'); ?> 
      </ul> 
    </li> 
  
	 
    <li> 
      <h2> 
        <?php _e('Categories'); ?> 
      </h2> 
      <ul> 
        <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?> 
      </ul> 
    </li> 
   
    <?php get_links_list(); ?> 
    <li> 
      <h2> 
        <?php _e('Meta'); ?> 
      </h2> 
      <ul> 
        <?php wp_register(); ?> 
        <li> 
          <?php wp_loginout(); ?> 
        </li> 
        <?php wp_meta(); ?> 
      </ul> 
    </li> 
  </ul> 
</div>

Open in new window

Avatar of jeremyjared74
jeremyjared74
Flag of United States of America image

You were missing the   <?php endif; ?> code after the dynamic sidebar call. Here is the corrected code:
<div class="sidebar"> 
<?php if ( !function_exists('dynamic_sidebar')
     || !dynamic_sidebar() ) : ?>
<?php endif; ?>
<ul> 
  <li id="search"> 
    <?php include(TEMPLATEPATH . '/searchform.php'); ?> 
  </li> 
  <li> 
    <h2>
      <?php _e('Archives'); ?>
    </h2> 
    <ul> 
     <?php wp_get_archives('type=weekly'); ?> 
    </ul> 
  </li> 
  <li> 
    <h2> 
      <?php _e('Categories'); ?> 
    </h2> 
    <ul> 
      <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?> 
    </ul> 
  </li> 
  <?php get_links_list(); ?> 
  <li> 
    <h2> 
      <?php _e('Meta'); ?> 
    </h2> 
    <ul> 
      <?php wp_register(); ?> 
      <li> 
        <?php wp_loginout(); ?> 
      </li> 
      <?php wp_meta(); ?> 
    </ul> 
  </li> 
</ul> 
</div>

Open in new window

Avatar of dmullis

ASKER

Still same problem. Widgets will not budge. I get the 4 pointed arrow but none will move to the side bar.
Try using a different browser, or dragging them and holding them over the area for a few seconds.
Avatar of dmullis

ASKER

Cannot get them to drag in FF or IE.
If you switch your theme to TwentyTen or TwentyEleven, does it work then?

Another thing you can try is going to Dashboard>Updates, then select re-install anyway (if your version is already up to date). Sometimes when you update WordPress some files don't install correctly and this might fix the issue.

If none of the above works, try disabling your plug-ins. If this does it then you have a plug-in that isn't registering JavaScript correctly.
Avatar of dmullis

ASKER

I can't get any of the other themes to move widgets either. I've done this before. Nothing budging now.
Avatar of dmullis

ASKER

I'll try the update. I don't have any plugins yet.
Avatar of dmullis

ASKER

I re-installed the update and I am using the TwentyTen 1.2 theme now.one of the widgets will move over. weird? I am on my local pc using wamp. Other things seem to work.
ASKER CERTIFIED SOLUTION
Avatar of jeremyjared74
jeremyjared74
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dmullis

ASKER

I installed Firebug on Firefox and changed the  config file to debug true. I am not sure how to test it other than go to the web page?
Avatar of dmullis

ASKER

this is weird though, in the search box on the blog - it had some </br> code in it so I deleted it and actually tried a search and in cam back with this error: Not Found

The requested URL /SlimShow/<br /><b>Notice</b>: get_bloginfo was called with an argument that is <strong>deprecated</strong> since version 2.2! The <code>home</code> option is deprecated for the family of <code>bloginfo()</code> functions. Use the <code>url</code> option instead. in <b>C:\wamp\www\SlimShow\wp-includes\functions.php</b> on line <b>3466</b><br />http://localhost/SlimShow/ was not found on this server.

I have validated each php file and the style.css and there are no errors.
It sounds like a javascript conflict to me.

If it still doesn't work with all your plugins disabled then maybe you have some custom javascript loading from the site.  If you track it down you can wrap it in  if ( ! is_admin() ) { } to only load on non-admin pages.
I'm just curious. How did you validate your php files?

Are you using an IDE to validate the PHP? Either way, they don't recognize all WordPress code, so while it may validate as PHP, it doesn't mean it's valid for WordPress.

You definately have an error in your code. I would say it's in your functions.php file. If you upload the code, I'll take a look at it.
Avatar of dmullis

ASKER

Awesome Jeremyjared74 ! I did get to see the debugger in action.


There were about 4. The last 2  messages were:

Notice: wp_list_cats is deprecated since version 2.1! Use wp_list_categories() instead.

Notice: get_links_list is deprecated since version 2.1! Use wp_list_bookmarks() instead. in 3382

 The real issue was I used an older wordpress/php tutorial to create my files.

So yes you were absolutely right on target! Issue resolved! Thankyou Sir :)
Avatar of dmullis

ASKER

I've requested that this question be closed as follows:

Accepted answer: 0 points for dmullis's comment http:/Q_27243136.html#36326198

for the following reason:

Excellent Problem solver!
Avatar of dmullis

ASKER

The question is NOTsupposed to be closed. Jeremyjared74's solution was accepted in full and excellent job of solving the problem. Please award him the 500 points.
Avatar of dmullis

ASKER

Excellent problem solving skills. On target!
Thanks dmullis:

I'm glad you picked up some new tools for troubleshooting. Firebug is a must have for me.