Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as PHP by plants ( 6 years ago )
//Updating failed. The response is not a valid JSON response.

add_shortcode( 'press_images', 'press_images_shortcode' );
function press_images_shortcode() {
    // Variables
    $post_count = 20;
    $post_type  = 'post';

    // WP_Query arguments
    $args = array(
        'post_type'         => array( $post_type ),
        'posts_per_page'    => $post_count,
    );

    // The Query
    $post_grid_query = new WP_Query( $args );

    // The Loop
    while ( $post_grid_query->have_posts() ) {
        $post_grid_query->the_post();
//the_post_thumbnail is giving me issues - removing it I have no error.
        the_post_thumbnail('medium');
    }
    // Restore original Post Data
    wp_reset_postdata();
}

 

Revise this Paste

Children: 111631
Your Name: Code Language: