• Hello guys
    please can you support me?
    Simply i need a query in the header of a page.
    in my sql i’ve this:

    INSERT INTOwp_posts(ID,post_author,post_date,post_date_gmt,post_content,

    so i need to call post_content.. how i must to do?
    i try this but nothing

    <?php
    function testme () {
    global $wpdb;
    $result = $wpdb->get_var("SELECT post_content FROM wp_posts");
    echo "<h1>".$cats."</h1>";
    }
    
    testme();
    ?>

    where i wrong?

The topic ‘query SELECT from db about wp_post’ is closed to new replies.