Skip to main content

Displaying Posts Using a Select Query Wordpress


Just change the highlighted text.

 <?php
    global $wpdb;
    $result = $wpdb->get_results ( "SELECT * FROM wp_huge_it_reslider_slides" );
    foreach ( $result as $print )   {
    ?>

<?php echo $print->description;?>

        <?php }
  ?>      

Comments

Popular posts from this blog

add custom post type

/**  *  * add custom post type  *  */ function my_custom_post_product() {   $labels = array(     'name'               => _x( 'Products', 'post type general name' ),     'singular_name'      => _x( 'Product', 'post type singular name' ),     'add_new'            => _x( 'Add New', 'book' ),     'add_new_item'       => __( 'Add New Product' ),     'edit_item'          => __( 'Edit Product' ),     'new_item'           => __( 'New Product' ),     'all_items'          => __( 'All Products' ),     'vi...

Toolset conditional

[wpv- if evaluate= "'[wpv-current-user info='id']' = '[wpv-post-author format='meta' meta='ID']' OR '[wpv-current-user info='role']' = 'administrator'" ]      //the content you want to hide goes here [/wpv- if ]