Featured image on pages
-
Hi,
I am using the free version of colormag theme.i have added a featured image in the page but its not displaying.is there any way to display the image?
-
Featured images also known as post thumbnails are a popular feature in WordPress themes.
An easy way to figure out whether your theme supports featured images is by going to the post editor. Simply create a new post and scroll down a little to see if there is a meta box called featured images on the right hand side of the screen.

yes i have added an image as featured image in a page but its not displaying. Also in posts its working fine.
i have added a plugin Featured Image in Content and its working.
but now two images are loading in posts.
go to your single.php
search for the_post()
or search for the_title()
after that line add
the_post_thumbnail('medium');May be it will solve the problem
go to your theme directory and see content-page…
replace the file content with this code.<?php /** * The template used for displaying page content in page.php * * @package ThemeGrill * @subpackage ColorMag * @since ColorMag 1.0 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php do_action( 'colormag_before_post_content' ); ?> <header class="entry-header"> <?php if ( is_front_page() ) : ?> <h2 class="entry-title"> <?php the_title(); ?> </h2> <?php else : ?> <h1 class="entry-title"> <?php the_title(); ?> </h1> <?php endif; ?> </header> <div class="entry-content clearfix"> <div class="featured-image"><?php the_post_thumbnail();?></div> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div style="clear: both;"></div><div class="pagination clearfix">'.__( 'Pages:', 'colormag' ), 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?> </div> <?php do_action( 'colormag_after_post_content' ); ?> </article>go to your theme directory and see content-page…
replace the file content with this code.No @altafhpatel, don’t recommend that. He will lose all of his changes and get upset when the theme updates. If he edits any of those files he will be making a mistake.
Instead ther user should create and activate a child theme, them modify copies of those files in the child theme directory.
may be he don’t know much about child theme. i am just giving him temporarily solution. but same way you can create the file in child theme.
Please do not suggest anyone edit those files directly. 😉
The topic ‘Featured image on pages’ is closed to new replies.
