Support » Plugins » Get all posts from a category?

  • Hey,

    I was just wondering, what’s the MySQL query to get ALL of the posts from ONE category (e.g., select * from wp_posts where category = ###). I just need the page title and page slug (url) from the table. I’m trying to generate my own dynamic menus. From the SQL table structure that I’m seeing, I see no coherence on how to do that…

    Thanks in advanced,


Viewing 2 replies - 1 through 2 (of 2 total)
  • Maybe you should get first familiar with the tool you are using before making these grandious plans of messing with the database and creating your “dynamic menus” (whatever that is).

    Posts and Pages are two different things, but you taalk about them as if they were interchangeable.
    Clicking on a category name it will display only posts from that category. Whether all or just a X number with ‘paged’ view – it’s up to you; you can use a plugin to set different # of posts in different views.
    What is displayed on your category archive view is determined by your Category_Templates.

    So, don’t tink you know the “how-to”. Just describe WHAT do you want to achieve, in plain English, no technical mambo-jambo, and some experinced helpers will tell you HOW to do it.

    I figured it out. The function I needed was [b]get_posts()[/b]. Solved!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get all posts from a category?’ is closed to new replies.