WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] get a LIST of posts (the links) (10 posts)

  1. Elan42.com
    Member
    Posted 6 years ago #

    Sorry but with all these deprecated functions I'm going crazy. I use 2.3.

    What I have to do to get a list of the posts inside a category?

    I want to also exclude the posts that are inside CHILD categories of THE category I'm getting the posts from.

    So, if I list the post of the category "news" I want to exclude all the posts that are inside the category "bad news" that is a "news" child category.

  2. moshu
    Member
    Posted 6 years ago #

    Any Category_Template will list your posts in that category... and it is just a matter of editing the template file to display whatever you want: only title, title and excerpt, title and content etc.

    There used to be a plugin "no subcats"
    http://ryowebsite.com/wp-plugins/nosubcats/
    I have no idea if it works with 2.3

  3. Elan42.com
    Member
    Posted 6 years ago #

    No... I need to list the title/link of the posts in a certain category... for a SIDEBAR...

    Not the entire posts inside "a loop".

  4. moshu
    Member
    Posted 6 years ago #

    Then use a miniloop in the sidebar qith query_posts.

  5. Elan42.com
    Member
    Posted 6 years ago #

    Mhh...

    What about the widget? Is it possible to create an instance of the rencent_posts and just display it?

    My problem is that I want to do that same thing, but inside a widget I did.

  6. moshu
    Member
    Posted 6 years ago #

    Every time you get an answer you change your question :)
    Decide what you want and describe it in details...

  7. Elan42.com
    Member
    Posted 6 years ago #

    Oh man, I'm sorry I'm not good in explaining myself ;)
    It's a good feature for a blogger.

    In my widget answer, I was talking about the "recent_posts" widget that is ALREADY present inside wodpress.

    I need to do exactly that thing... but I need to do inside a sidebar object that I'm developing, so I need the code that generates that "recent_posts" using the widget called "recent posts".

  8. moshu
    Member
    Posted 6 years ago #

    And what stops you from looking into the widgets file? You know that lately the widgets are built-in...
    wp-includes/widgets.php

  9. Elan42.com
    Member
    Posted 6 years ago #

    I resolved without documentation cause I didn't find any:
    <ul><?php wp_widget_recent_entries(array('number'=>'5', 'before_title'=>'<li><span>', 'after_title'=>'</span></li>', 'title'=>'Recent Posts:')); ?></ul>

    However thank you, of course I was obligated to watch at widgets.php.
    I didn't knew that the widgets were here.

  10. Elan42.com
    Member
    Posted 6 years ago #

    The better solution was:
    <p><?php wp_get_archives('type=postbypost&limit=20'); ?></p>

    Bye and sorry for the mess :D

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.