How to find a post id using the post_excerpt?
You can get the post ID from the excerpt, but as far as I can tell, WP_Query doesn’t support this (very well), so you need to write a custom WPDB query. function get_post_id_by_excerpt($excerpt) { global $wpdb; $result = $wpdb->get_row( $wpdb->prepare(“SELECT ID FROM {$wpdb->prefix}posts WHERE post_excerpt LIKE %s”, $excerpt) ); return $result; } For this to … Read more