<?php$key = "quote"; // custom field key to query onglobal $wpdb;$quotations = $wpdb->get_results("SELECT * FROM $wpdb->posts LEFT JOIN $wpdb->postmeta ON ID = post_id WHERE meta_key = '$key' AND post_status = 'publish' AND post_type='post' ORDER BY post_date DESC");if($quotations) : foreach($quotations as $post) :setup_postdata($post);?> <h2><?php the_title(); ?></h2> <?php echo apply_filters('the_content', $post->meta_value); ?><?php endforeach; else : ?> <h2>No quotations were found in the database.</h2><?php endif; ?>