How To Add Feature Image To Carrington Mobile Theme

Mhizta VincentJune 23, 2020

Hello, Welcome To My Official Blog, here I am gon a teach you on how to add feature image to you Carrington Mobile Theme easily without stress.


First , Go-to Your Function.php And Paste This Code Below 👇


{ the_post_thumbnail();}


function thumb() {
global $post, $posts;
$first_img = '';
$output = preg_match_all ('/<img.*?src=\"((?!\").*?)\"/i', $post->post_content, $matches);
$first_img = $matches[1][0];
if(empty($first_img)){ //Defines a default image
$first_img = "default image link";
return $first_img;

Then Proceed To Your Except-default And Paste This


<imgsrc="<?php%20echo%20thumb(); ?>" alt="blablabla" />


Then We Are Done.


(1) comment

  • Mhizta VincentJune 23, 2020Reply

    Nice one

Leave a comment

Name *
Add a display name
Email *
Your email address will not be published