Dear Team,
How to display the category type and post date in single post page below the big images.
Hey Vadivel,
Thank you for the inquiry.
If you want to move the category below the featured image, you have to modify the theme’s includes > loop-index.php file, and look for this code.
//elegant blog
//prev: if( $blog_global_style == 'elegant-blog' )
if( strpos( $blog_global_style, 'elegant-blog' ) !== false )
{
$cat_output = '';
if( ! empty( $cats ) )
{
$cat_output .= '<span class="blog-categories minor-meta">';
$cat_output .= $cats;
$cat_output .= '</span>';
$cats = '';
}
if ( in_array( $blog_style, array( 'bloglist-compact', 'bloglist-excerpt' ) ) )
{
echo $title;
}
else
{
// The wrapper div prevents the Safari reader from displaying the content twice ¯\_(ツ)_/¯
echo '
<div class="av-heading-wrapper">';
if( strpos( $blog_global_style, 'modern-blog' ) === false )
{
echo $cat_output . $title;
}
else
{
echo $title . $cat_output;
}
echo '</div>
';
}
Move it above these lines:
$cats = '';
$title = '';
$content_output = '';
Best regards,
Ismael
After the category type i need post date.in the same line.
Example category type | Mar 10 2020
Hi,
In the previous code, look for this line:
else
{
echo $title . $cat_output;
}
.. then add this snippet below it.
echo "<span class='text-sep text-sep-date'>/</span>";
echo "<time class='date-container minor-meta updated' >" . get_the_time( get_option( 'date_format' ) ) . '</time>';
Best regards,
Ismael