• Hello I was wondering how do you edit the recent posts widget so in the sidebar it displays some meta data I want eg the date of the post.

    Justin

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi justin,

    You can edit recent post’s widgets.

    For that please go to your Admin panel.

    Select Appearance/Widgets menu item where, you can post your required Widgets on to the Leftbar, Rightbar, or Mainmenu depends upon your theme.

    This can be done by simply Drag the required Widgets from the Available Widgets and Drop them on to the Sidebar.

    Then Update your post and reload it.

    But do remember that if your theme does not support any Sidebar then you cannot place any Widgets on it. For that, you have to change your theme.

    Thread Starter justin105

    (@justin105)

    Thats is using the widget which i know but I want it to display some certaint extra meta data. The fdate of the post i want in the sidebar and some other info.

    Justin

    If you want to code it yourself then this might help.
    http://codex.wordpress.org/Template_Tags/get_posts#Latest_posts_ordered_by_title

    Thread Starter justin105

    (@justin105)

    Thank you Reuben that was better. Do you know if I edit the actual widget (Recent Posts), & Where do I put the code if i was going to use the following code:

    <?php
    $postslist = get_posts(‘numberposts=10&order=ASC&orderby=title’);
    foreach ($postslist as $post) :
    setup_postdata($post);
    ?>
    <div>
    <?php the_date(); ?>

    <?php the_title(); ?>
    <?php the_excerpt(); ?>
    </div>
    <?php endforeach; ?>

    Don’t use recent posts widget. Add that code to your sidebar or wherever you want to display recent posts.

    Thread Starter justin105

    (@justin105)

    ok thanks

    justin

    Thread Starter justin105

    (@justin105)

    Reuben

    It worked almost the way I wanted it to. But i want to be able to restrcit how much of the actual post it shos on the sidebar… then I want a link to say click here to read more and goes to the corrsesponding post.

    is this possible?

    Thanks

    Justin

    Thread Starter justin105

    (@justin105)

    Also the Post name for <?php the_title(); ?> always comes up with the title as Home and post date doesnt come up for the second post.

    Thread Starter justin105

    (@justin105)

    I am having a problem where on my front page / homepage i have the code below in a php widget and it displays the title as Home for all the posts and the date isnt changing and doesnt display on every post.

    The Code I am using is the following:

    <?php
    $postslist = get_posts(‘numberposts=5&order=ASC&orderby=title’);
    foreach ($postslist as $post) :
    setup_postdata($post);
    ?>
    <div class=”post_title”>
    <?php the_title(); ?>
    </div>
    <div class=”post_date”>
    <?php the_date(); ?>
    </div>
    <?php endforeach; ?>

    The CSS Is the following

    .post_title {
    font-size:16px;
    color:#333;
    padding-top:5px;
    font-weight:bold;
    border-bottom:1px solid #999;
    margin-bottom:10px;
    }

    .post_title a {
    text-decoration:none;
    color:#333;
    }
    .post_date {
    color:#FFF;
    background-color:#333333;
    font-weight:bold;
    font-size:12px;
    width:110px;
    text-align:center;
    height:20px;
    padding-top:5px;
    margin-bottom:5px;
    }

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Recent Posts Widget’ is closed to new replies.