How can I retrieve a Featured Image thumbnail using only the Post_title?

You can try the following: /** * Get the featured image by post title (Simple version) * * @see http://wordpress.stackexchange.com/a/158344/26350 * @param string $title Post title * @param mixed $size Featured image size */ function get_featured_image_by_post_title_wpse_simple( $title=””, $size=”thumbnail” ) { $obj = get_page_by_title( $title, OBJECT, ‘post’ ); return ( is_object ( $obj ) ) ? … Read more

Add Featured Image from Existing wp-content folder

While looking at some code for another issue I had a lightbulb went off in my head and brought me back to this problem. So after several tries at it I came up with this… function add_image_to_feed( $thumbz){ if( is_feed() ){ $def_thmb = get_post_meta( get_the_ID(),’def_thmb’,true); $subPath = tube_sub_dir_path(get_the_ID()); $upload_dir = wp_upload_dir(); $thumb_ur = $upload_dir[baseurl].”/tube-thumbs/”.$subPath.””; $thumbz … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)