Title: widgetizing my theme&#8230; HELP
Last modified: August 19, 2016

---

# widgetizing my theme… HELP

 *  [jruh1e](https://wordpress.org/support/users/jruh1e/)
 * (@jruh1e)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/widgetizing-my-theme-help/)
 * hi! i not to good with html, and I am looking for help! I read the word press
   write up over at [http://codex.wordpress.org/Widgetizing_Themes](http://codex.wordpress.org/Widgetizing_Themes)
   but this just confuses me!
 * can someone plz help! My template is DrunkLoser and This is the sidebar makeup:
 *     ```
       <div id="navigation">
             <!-- Start of Navigation -->
   
             <div class="nav_title"><img src="<?php bloginfo('url'); ?>/wp-content/themes/drunkloser/images/last-posts.jpg" alt="Last Posts" /></div>
   
       <ul>
              <?php
               $posts = get_posts('numberposts=5');
               foreach($posts as $post) :
               ?>
   
       <li><a>"><?php the_title(); ?></a></li>
              <?php endforeach; ?>
       	    </ul>
           <div class="nav_title"><img src="<?php bloginfo('url'); ?>/wp-content/themes/drunkloser/images/archives.jpg" alt="Archive" /></div>
   
       <ul>
              <?php wp_get_archives('type=monthly&show_post_count=0'); ?>
             </ul>
           <div class="nav_title"><img src="<?php bloginfo('url'); ?>/wp-content/themes/drunkloser/images/links.jpg" alt="Links" /></div>
   
       <ul>
             <?php wp_get_links(1); ?>
            </ul>
       <table valign=top align=middle><tr><td><a>
       "><IMG SRC="http://jerseyshor3.com/images/jerseysurvey.gif" BORDER=0 ALT=""></a></td></tr></table>
   
       <!-- End of Navigation -->
           </div>
       ```
   

Viewing 1 replies (of 1 total)

 *  [roadie](https://wordpress.org/support/users/roadie/)
 * (@roadie)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/widgetizing-my-theme-help/#post-1409814)
 * Does this version of the code do anything?
 * > <div id=”navigation”>
   >  <!– Start of Navigation –>
   >  <div class=”nav_title”><img src=”<?php bloginfo(‘url’); ?>/wp-content/themes/
   > drunkloser/images/last-posts.jpg” alt=”Last Posts” /></div>
    -  <?php
       $posts = get_posts(‘numberposts=5’); foreach($posts as $post) : ?>
    - 
    -  <?php endforeach; ?>
 *  <div class=”nav_title”><img src=”<?php bloginfo(‘url’); ?>/wp-content/themes/
   drunkloser/images/archives.jpg” alt=”Archive” /></div>
    -  <?php wp_get_archives(‘type=monthly&show_post_count=0’); ?>
 *  <div class=”nav_title”><img src=”<?php bloginfo(‘url’); ?>/wp-content/themes/
   drunkloser/images/links.jpg” alt=”Links” /></div>
    -  <?php wp_get_links(1); ?>
 * <table valign=top align=middle><tr><td>
    “><IMG SRC=”
   [http://jerseyshor3.com/images/jerseysurvey.gif&#8221](http://jerseyshor3.com/images/jerseysurvey.gif&#8221);
   BORDER=0 ALT=””></td></tr></table>
 * <?php if ( !function_exists(‘dynamic_sidebar’)
    || !dynamic_sidebar() ) : ?> 
   <?php endif; ?>
 * <!– End of Navigation –>
    </div>
 * Don’t forget you need to have a file called functions.php in your theme directory
   with a register_sidebar call (as described in the documentation). Also in your
   dashboard, you need to actually put some widgets in your sidebar in order to 
   see any difference.
 * Copying your code seems to make some errors more visible.

Viewing 1 replies (of 1 total)

The topic ‘widgetizing my theme… HELP’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [roadie](https://wordpress.org/support/users/roadie/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/widgetizing-my-theme-help/#post-1409814)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
