Support » Plugins » Plugin for adding a few article titles in the sidebar

  • Hello,

    Is there a plugin that can publish a number of article titles in the sidebar? Sort of a “Recommended Articles”, or “Most Read Articles” (but with the possibility to decide exactly what articles appear there).

    Thanks in advance.

Viewing 8 replies - 1 through 8 (of 8 total)
  • This displays post id 1,170, and 172 so try that in your sidebar.php.

    <?php
    $posts=get_posts(array('post__in' => array(1,170,172)));
    if ($posts) {
    foreach($posts as $post) {
    setup_postdata($post);
    ?>
    <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
    <?php }
    }
    ?>

    Related:
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

    I’m sure this works and I won’t have any problem using it, however a normal blog user won’t be able to change the articles in the sidebar by themselves.

    Thank you for the suggestion, if I won’t be able to find an plugin I’ll use this.

    I won’t have any problem using it, however a normal blog user won’t be able to change the articles in the sidebar by themselves

    Well you certainly have me confused 😉 Wouldn’t the user just navigate to the things they thought important?

    I’m probably the one confused, what exactly does your code do?

    It displays 3 post titles in the sidebar, where the post IDs are 1,170,172. Of course, you will use different post IDs, I suspect.

    To see it work, add that code just before the <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?> line in `wp-content/themes/default/sidebar.php. Then change to the WordPress Default Theme.

    Of course you could also consider downloading and installing Otto’s php code widget and put that code in one of those widgets.

    Thank you for the clarification.

    What I meant was, I’m just the web designer, the blog I’m working on is owned and used by a person with no web design skills, the idea is to make it possible for that person to chose what posts are displayed in the sidebar without my intervention.

    The idea is to have a way to promote several posts of grater importance, which will change in time.

    I think I might be able to do something with Otto’s php widget, if no other option exists.

    With the php Widget at least they can edit code as long as they know the post IDs.

    That’s what I was thinking, thanks for your assistance.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Plugin for adding a few article titles in the sidebar’ is closed to new replies.