Featured Images are a great addon, especially on Wordpress desktop themes. But we all know that Carrington Mobile Theme and some other mobile themes don't support it, not a big deal, since most newbies don't even know how to use. However, some would love to have it on their mobile Themes, especially themes built on Carrington. If you are not a fan of having it on mobile, no need to read further. But if you like and wish to implement it, copy these codes and paste in the files I am going to list. Quite simple.
The screenshot above is the dashboard before adding the codes I am going to drop. After adding the codes, you'll see the new look...
1. FUNCTIONS.PHP
Go to functions.php and add this code at the bottom
2. CONTENT DEFAULT.PHP
Go to ContentDefault.php and add this code
ADD the code where you want your FEATURED image to show in the post. But ideally, the code should be above this code below
NOW, add this css code at the bottom of Content Default.php ..
The css code makes your FEATURED image responsive.
Once you are done, go to your dashboard and set your FEATURED image.
BELOW IS THE RESULT! ENJOY!
If you have problems implementing this tutorial, feel free to PM me to help you implement it. Have any questions? Ask below!
The screenshot above is the dashboard before adding the codes I am going to drop. After adding the codes, you'll see the new look...
1. FUNCTIONS.PHP
Go to functions.php and add this code at the bottom
Code:
function gt_init(){
add_theme_support('post-thumbnails');
add_theme_support('title-tag');
add_theme_support('html5',
array('comment-list', 'comment-form', 'search-form', 'caption')
);
}
add_action('after_setup_theme', 'gt_init');
?>
2. CONTENT DEFAULT.PHP
Go to ContentDefault.php and add this code
Code:
ADD the code where you want your FEATURED image to show in the post. But ideally, the code should be above this code below
Code:
the_content();
$args = array(
'before' => ''. __('Pages: ', 'carrington-mobile'),
'after' => "
\n",
'next_or_number' => 'number'
);
wp_link_pages($args);
?>
NOW, add this css code at the bottom of Content Default.php ..
Code:
The css code makes your FEATURED image responsive.
Once you are done, go to your dashboard and set your FEATURED image.
BELOW IS THE RESULT! ENJOY!
If you have problems implementing this tutorial, feel free to PM me to help you implement it. Have any questions? Ask below!