Wordpress Plugin that can display All Posts from a category withing a box.

Discussion in 'HTML & Website Design' started by orionassam, May 10, 2011.

  1. #1
    Dear Friends, I am looking for a plugin that can display all posts from a plugin within a box such as the one found here - http://www.gsmarena.com/hp_veer_4g-3943.php

    I found many plugins for WordPress which were displaying posts from a particular category but they weren't displaying the way i am searching for. Please guide me.
     

    Attached Files:

    orionassam, May 10, 2011 IP
  2. twowebros

    twowebros Active Member

    Messages:
    42
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #2
    Hey,
    you can use
    <?php
    global $post;
    $args = array( 'numberposts' => 5, 'offset'=> 1, 'category' => 1 );
    $myposts = get_posts( $args );
    foreach( $myposts as $post ) : setup_postdata($post); ?>
    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    <?php endforeach; ?>
    </ul>
    in your code.

    you can put it in your own div .this would be helpful to you. for more details search get_posts it on wordpress site.

    thanks
    2webros
     
    twowebros, May 10, 2011 IP
  3. twowebros

    twowebros Active Member

    Messages:
    42
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #3
    if you want scroll just put div style css property overflow:scroll or overflow:auto.

    thanks
    2webros
     
    twowebros, May 10, 2011 IP
  4. orionassam

    orionassam Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks for your valuable input.

    I have installed a plugin called "category posts widget" found here -http://wordpress.org/extend/plugins/category-posts/

    Now, I was looking to add some style css to this widget but this widget renders the css found in the theme and that creates little problem for me.

    Please guide me, if is it possible to add custom css style to this widget only. I was wondering how to customize this specific widget by adding what line to define this widget at style.css file of theme.
     
    Last edited: May 10, 2011
    orionassam, May 10, 2011 IP
  5. twowebros

    twowebros Active Member

    Messages:
    42
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #5
    hii,
    you can create your own style by following steps.
    first go to wp-content/themes/your theme/functions.php
    here you will find function twentyten_widgets_init() go there and in which widget area is your widget change according to your requirenment

    thanks
    2webros
     
    twowebros, May 10, 2011 IP
  6. orionassam

    orionassam Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks for your reply. This was really helpful.
     
    orionassam, May 10, 2011 IP
  7. twowebros

    twowebros Active Member

    Messages:
    42
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #7
    ohhkk No problem :)
     
    twowebros, May 11, 2011 IP