• davestewart

    (@davestewart)


    I want to create a list of post titles, if possible from a set category.

    The get_posts seems like massive overkill! Is there a function for this, or shall I write my own SQL SELECT query?

    Thanks,
    Dave

Viewing 4 replies - 1 through 4 (of 4 total)
  • moshu

    (@moshu)

    or shall I write my own SQL SELECT query?

    THAT’s the real overkill!

    Using the normal Loop and having only the_title tag in it… doesn’t work for you? – It does for everybody else.

    Thread Starter davestewart

    (@davestewart)

    OK, OK! I’m new to WordPress and still figuring it all out.

    I’m building an index page for a CMS, and I’m going to be listing 150 – 200 posts, all in their respective categories. Each one will show the title and a metadata intro below it.

    So the Loop is different from the get_posts() then?

    get_posts() seems to grab a lot of stuff from the database! But the Loop doesn’t? I guess I need to get in and play some more…

    Thread Starter davestewart

    (@davestewart)

    Holy smokin’ database Batman!

    `include_once “../wp-blog-header.php”;
    print_r($wp_query)`

    There’s a lot of code being output here! Does this grab EVERYTHING in the database!?

    I don’t have my 200 entries in yet, but when I do, will every single page-load for the site grab all the entries, every time?

    Is this the WordPress way then? Grab everything once (whether you need it or not) then just have it available?

    I hope I’m not barking up the wrong tree, I’m just trying to understand.

    ??

    Thread Starter davestewart

    (@davestewart)

    No takers for this one?
    Thanks,
    Dave

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Listing post titles’ is closed to new replies.