Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1212947

    Dear Team,

    How to display the category type and post date in single post page below the big images.

    #1214518

    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

    #1214610

    After the category type i need post date.in the same line.

    Example category type | Mar 10 2020

    #1216027

    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

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.