Move WordPress Featured Image below Post Title
Steps on how to move WordPress Featured Image below Post Title:
Note : First and foremost ensure you take backup of Contents.php template before you start with the process. If by mistake code gets messed up then we need backup to set things correctly.
Step 1:
Step 2:
Step 3:
Step 4:
<?php if (has_post_thumbnail()) { ?>
<div class=”content-list-thumb”>
<a href=”<?php the_permalink(); ?>” title=”<?php the_title_attribute(); ?>”>
<?php the_post_thumbnail(‘mh-joystick-lite-slider’); ?>
</a>
<?php if (has_category()) { ?>
<span class=”content-list-category”>
<?php $category = get_the_category(); echo $category[0]->cat_name; ?>
</span>
<?php } ?>
</div>
<?php } ?>
<h2 class=”content-list-title”>
<a href=”<?php the_permalink(); ?>” title=”<?php the_title_attribute(); ?>” rel=”bookmark”>
<?php the_title(); ?>
</a>
</h2>
</header>
<div class=”content-list-excerpt”>
<?php the_excerpt(); ?>
</div>
<?php if ($mh_joystick_lite_options[‘read_more’] != ”) { ?>
<div class=”content-list-more”>
<a href=”<?php the_permalink(); ?>” title=”<?php the_title_attribute(); ?>” rel=”bookmark”>
<span><?php echo esc_attr($mh_joystick_lite_options[‘read_more’]); ?></span>
</a>
</div>
<?php } ?>
</article>
Step 5:
<h2 class=”content-list-title”>
<a href=”<?php the_permalink(); ?>” title=”<?php the_title_attribute(); ?>” rel=”bookmark”>
<?php the_title(); ?>
</a>
</h2>
</header><?php mh_joystick_lite_post_meta(); ?>
Step 6:
Paste the removed code on the top of template just below the very first line in Content.php template for the wordpress featured image to look below post title.
<?php $mh_joystick_lite_options = mh_joystick_lite_theme_options(); ?>
Step 7:
<?php $mh_joystick_lite_options = mh_joystick_lite_theme_options(); ?>
<header class=”content-list-header”>
<h2 class=”content-list-title”>
<a href=”<?php the_permalink(); ?>” title=”<?php the_title_attribute(); ?>” rel=”bookmark”>
<?php the_title(); ?>
</a>
</h2>
</header>
<?php if (has_post_thumbnail()) { ?>
<div class=”content-list-thumb”>
<a href=”<?php the_permalink(); ?>” title=”<?php the_title_attribute(); ?>”>
<?php the_post_thumbnail(‘mh-joystick-lite-slider’); ?>
</a>
<?php if (has_category()) { ?>
<span class=”content-list-category”>
<?php $category = get_the_category(); echo $category[0]->cat_name; ?>
</span>
<?php } ?>
</div>
<?php } ?><div class=”content-list-excerpt”>
<?php the_excerpt(); ?>
</div>
<?php if ($mh_joystick_lite_options[‘read_more’] != ”) { ?>
<div class=”content-list-more”>
<a href=”<?php the_permalink(); ?>” title=”<?php the_title_attribute(); ?>” rel=”bookmark”>
<span><?php echo esc_attr($mh_joystick_lite_options[‘read_more’]); ?></span>
</a>
</div>
<?php } ?>
</article>