LOGIN
 CONTACT
 SEARCH

Scar.form

Javascript disabled!

You currently have javascript disabled. This site is best viewed with javascript active. Please turn javascript on and refresh this page.

WordPress: Dropdown mini-loop and blogroll

Taking a page from this tutorial at Problogdesign.com, you can apply this drop-down menu method to just about anything in WordPress, from a mini loop to the blogroll.

I’ll assume that you’ve already followed the steps in the tutorial, and created your markup and css and image.

For these examples, you’ll need to make sure all .css references match the div class names that are set in the examples.

Blogroll:

1
2
3
4
5
6
<div class="blogroll">
<p>Blogroll</p>
<ul>
<?php wp_list_bookmarks('title_li=&categorize=0'); ?>
</ul>
</div>

Mini-loop:

1
2
3
4
5
6
7
8
9
10
11
<div class="miniloop">
<ul>
<?php
                    $new_posts = get_posts("numberposts=20");
                    foreach($new_posts as $post){
                    setup_postdata($post);
                     ?>
                        <li>&nbsp;&nbsp;<h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3></li>
                        <?php }?>
</ul>
</div>

Leave a Reply

X

Send Email

X

Search This Site

X

Login