WordPress.org

Ready to get started?Download WordPress

Forums

Listing posts by category without going through 'The Loop' (4 posts)

  1. dtsn
    Member
    Posted 6 years ago #

    How would I go about listing the posts within a certain category without going through 'The Loop'. Secondly does anyone know of anyway to extract image tags from posts. I.E. I only want to show the image and not the text.

    Thanks

    Daniel

  2. moshu
    Member
    Posted 6 years ago #

    1. Not really. It is the Loop that displays the posts.

    2. I have never seen anything like that in WP. (which doesn't mean it is impossible)

  3. dtsn
    Member
    Posted 6 years ago #

    Hi,

    Let me tell you what i am trying to achieve, it might make more sense that way. I am trying to separate the posts on my blog into a sub category which only gets displayed in the sidebar. Specifically this subcategory will only display pictures and links, but with a description for the feed. I was using the Blogroll, but i then discovered you can't subscribe to the blogroll as an RSS feed, so i am trying to think up alternatives.

    I didn't want to use the loop because i thought it would be a bit of an overhead to select all the posts only to show very little of them.

    Any help or advice as to how i achieve this would be great.

    Thanks

    Daniel

  4. moshu
    Member
    Posted 6 years ago #

    I am trying to separate the posts on my blog into a sub category which only gets displayed in the sidebar.

    That part is easy: it can be a category or subcategory that is excluded from the main page (use a plugin) and then display that one category only by using a miniloop in your sidebar.
    The_Loop
    Template_Tags/query_posts
    Everybody does it in that way.

    With the Template_Tags you can define what is and what is not displayed.

    I don't know how to make a "description for the feed" but hopefully you do :)

Topic Closed

This topic has been closed to new replies.

About this Topic