Hello, I need to customized the functions in my theme to make it auto generate thumbnails from posts (the first image) that is not local, it`s referenced in a url. I have the code, I just need to make it work with this theme.
My website is: [login to view URL]
As you can see, I have tried using the Auto Post Thumbnail plugin but it generated the thumbnail from the second picture (that is referenced localy) not the first one from the url.
////////////////////////////////////////////////////////////////////////////////
// Get Featured Post Image
////////////////////////////////////////////////////////////////////////////////
function get_featured_slider_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('//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/[login to view URL]';
}
return $first_img;
}
////////////////////////////////////////////////////////////////////////////////
// Get Post Image
////////////////////////////////////////////////////////////////////////////////
function get_post_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('//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/[login to view URL]';
}
return $first_img;
}
////////////////////////////////////////////////////////////////////////////////
// Get Featured Category Image
////////////////////////////////////////////////////////////////////////////////
function get_featcat_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('//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/[login to view URL]';
}
return $first_img;
}
Hello,
After having look at your requirement,
I would like to offer you our quality services
which will be your ultimate goal and requirement to have.
With the market presence of 5+ years,
we have worked on 1500+ successful projects ranging from $50 to $20,000 USD.
We have been providing quality service with the customer satisfaction
and within the time line to 20+ Web/print partners.
Awaiting for your favorable response.
Regards,
Krunal