WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Adding bullet points to get_posts (2 posts)

  1. Oakey22
    Member
    Posted 4 years ago #

    i have get_posts in my sidebar which returns the last 7 posts in a certain category, how do i make it up something before every post link?
    like one of those arrows, is it a raquo or laquo?

    the code i use is,

    <h2><?php echo "Latest News"; ?></h2>
       <?php
     global $post;
     $myposts = get_posts('numberposts=7&category=28&order=DESC&orderby=ID');
     foreach($myposts as $post) :
     ?>
    
        <li><a href=<?php the_permalink(); ?>><?php the_title(); ?></a></li>
        <p>
          <?php endforeach; ?>
  2. Oakey22
    Member
    Posted 4 years ago #

    sorted it now thanks.

    did this

    <h2><?php echo "Latest News"; ?></h2>
       <?php
     global $post;
     $myposts = get_posts('numberposts=7&category=28&order=DESC&orderby=ID');
     foreach($myposts as $post) :
     ?>
    
        <li> &raquo<a href=<?php the_permalink(); ?>><?php the_title(); ?></a></li>
        <p>
          <?php endforeach; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic