Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS WordPress sidebar

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #23831
    magicmike06
    Member

    i have it set up so that on my sidebar in wordpress it gathers and displays the posts that are in certain categories. however its not posting the right category. the to categories are news and cal. however its posting news in the calender section as well any ideas i have posted the script below. and heres the website url. http://apluscleaningfreeport.com
    the website is not complete as u can tell.

    any ideas?

    Quote:
    <div id="linksidbar">

    <div id="sidebarsearch">

    <?php include (TEMPLATEPATH . ‘/searchform.php’); ?>
    </div>

    <div id="news">

    <ul id="newsinside">

    <?php
    global $post;
    $myposts = get_posts(‘numberposts=5&offset=1&category=news’);
    foreach($myposts as $post) :
    ?>
    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    <?php endforeach; ?>

    </ul>
    </div>

    <div id="cal">

    <ul id="calinside">

    <?php
    global $post;
    $myposts = get_posts(‘numberposts=5&offset=1&category=calendar’);
    foreach($myposts as $post) :
    ?>
    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    <?php endforeach; ?>

    </ul>
    </div>

    </div>

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.