Global $wpdb is not showing correct data with function call
With @Jacob Peattie suggestion, I have recoded it & it is working perfectly fine with functions. /* Recent updated post & pages */ if ( ! function_exists( ‘iq_recent_update’ ) ) : function iq_recent_update() { $orig_post = $post; global $post; $args=array( ‘posts_per_page’ => 3, ‘orderby’ => ‘modified’, ‘order’ => ‘DESC’, ‘post_type’ => array(‘post’, ‘page’), ‘post_status’ => … Read more