Title: Please help: Javascript in sidebar without widgets
Last modified: August 19, 2016

---

# Please help: Javascript in sidebar without widgets

 *  [goregasm](https://wordpress.org/support/users/goregasm/)
 * (@goregasm)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/please-help-javascript-in-sidebar-without-widgets/)
 * I’m trying to implement a javascript to rotate banners on sidebar of the theme
   nightlife-idea that does not support widgets (the theme viewer site says it does,
   but they don’t work). I’ve been reading about using javascript on this site but
   everytime it talks about using a text widget to place code on the sidebar. Where
   can I place the script in this structure? I want to exchange the content of the
   default blogroll with a banner rotator (loop scroller) that link to other sites.
 *     ```
       <div id="sidebar">
       <div id="rss">
       <a href="<?php bloginfo('rss2_url'); ?>" title="RSS FEED"><img border="0" src="<?php bloginfo('stylesheet_directory'); ?>/images/rss.gif" width="150" alt="RSS FEED"height="28"></a>
       </div>
       <div id="searchbg">
       <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/"><p align="center">
       <input type="text" value="search..." name="s" id="s"
       value="search..." onblur="if (this.value == '') {this.value = 'search...';}"
       onfocus="if (this.value == 'search...') {this.value = '';}"/>
       <input type="submit" value="&raquo;" id="go"></form>
       </div>
       		<ul>
       				<li>
       					<h2>Categories</h2>
       					<ul>
       						<?php wp_list_cats('sort_column=name&hierarchical=0'); ?>
       					</ul>
       				</li>
   
       				<li>
       					<h2>Archives</h2>
       					<ul>
       						<?php wp_get_archives('type=monthly'); ?>
       					</ul>
       				</li>
   
       			</li>
       			</ul>
   
       			<ul>
   
       				<li>
       				<li>
       					<h2>Blogroll</h2>
       					<ul>
       						<?php get_links(-1, '<li>', '</li>', '', FALSE, 'name', FALSE, FALSE, -1, FALSE); ?>
       					</ul>
       				</li>
   
       				<li>
       					<h2>Meta</h2>
       					<ul>
       						<?php wp_register(); ?>
       						<li><?php wp_loginout(); ?></li>
       						<?php wp_meta(); ?>
       					</ul>
       				</li>
       			</ul>
       		</div>
       		<!-- end #sidebar -->
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/please-help-javascript-in-sidebar-without-widgets/#post-679366)
 * That’s the blogroll part:
 *     ```
       <li>
       <li>
          <h2>Blogroll</h2>
       	<ul>
       <?php get_links(-1, '<li>', '</li>', '', FALSE, 'name', FALSE, FALSE, -1, FALSE); ?>
       	</ul>
       </li>
       ```
   
 * and you have “double” opening li!
 *  Thread Starter [goregasm](https://wordpress.org/support/users/goregasm/)
 * (@goregasm)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/please-help-javascript-in-sidebar-without-widgets/#post-679408)
 * Thanks for the fast reply, moshu!
 * The code I posted is the default sidebar.php that comes with the theme. If that
   li is a mistake, it’s done by the author. Using my very limited coder skills,(
   but still enough to identify the blogroll part of the code) i found an extra /
   li too, so i ended up deleting this part, hoping the widgets might work.
 *     ```
       </li>
       			</ul>
   
       			<ul>
   
       				<li>
       ```
   
 * Nothing happened, the behavior is the same.
 *  [Adam Brown](https://wordpress.org/support/users/adamrbrown/)
 * (@adamrbrown)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/please-help-javascript-in-sidebar-without-widgets/#post-679421)
 * The theme is not widgetized (unless you didn’t paste the entire sidebar.php up
   there). To learn how to widgetize it…
 * [http://automattic.com/code/widgets/themes/](http://automattic.com/code/widgets/themes/)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Please help: Javascript in sidebar without widgets’ is closed to new 
replies.

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [no widgets](https://wordpress.org/support/topic-tag/no-widgets/)
 * [sidebar](https://wordpress.org/support/topic-tag/sidebar/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [Adam Brown](https://wordpress.org/support/users/adamrbrown/)
 * Last activity: [18 years, 5 months ago](https://wordpress.org/support/topic/please-help-javascript-in-sidebar-without-widgets/#post-679421)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
