Inserted
-
HI, really nice plugin.. I installed and it workd as I expected, on your FAQ i saw that there’s a way to call the images using this function..
$avatar = get_author_image_url()
Do you think can help to use and integrated this with my themes?
$first_img = $img_dir . '/images/post-default.jpg';
Im thinking to show author’s avatar instead post-default.jpg as default if no images on the contents.
Please find the full script below that exist on my themes, if you can give me direction how to achieves this, it would really helpfull.function get_post_image() { global $post, $posts; $first_img = ''; ob_start(); ob_end_clean(); $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches); $first_img = $matches [1] [0]; if(empty($first_img)){ //Defines a default image $img_dir = get_bloginfo('template_directory'); $first_img = $img_dir . '/images/post-default.jpg'; } return $first_img; }
https://www.ads-software.com/extend/plugins/easy-author-image/
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Inserted’ is closed to new replies.