badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Reply To: BLOG Medium – Custom Post Category

#25463

Hi aris,

Yes you can make it default but you have to customize the code. Before making any changes in the code first of all you need to create a child theme and then only customize the code so that your updated version will not lose the code.

You go to the theme folder -> inc -> structure -> content-extension.php on line no 87 can you see this functions
if ( ! function_exists( 'ultimate_theloop_for_archive' ) ) :

If yes then can you see this line no 134 to 143, you will find this code.

    <?php
			if( has_post_thumbnail() ) {
				$image = '';        			
	     		$title_attribute = apply_filters( 'the_title', get_the_title( $post->ID ) );
	     		$image .= '<figure class="post-featured-image">';
	  			$image .= '<a href="' . get_permalink() . '" title="'.the_title( '', '', false ).'">';
	  			$image .= get_the_post_thumbnail( $post->ID, 'featured', array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ) ) ).'</a>';
	  			$image .= '</figure><!-- .post-featured-image -->';
	  			echo $image;
  		} ?>

Replace above code and add this below code

<?php
        if( has_post_thumbnail() ) {
          $image = '';              
            $title_attribute = apply_filters( 'the_title', get_the_title( $post->ID ) );
            $image .= '<figure class="post-featured-image">';
            $image .= '<a href="' . get_permalink() . '" title="'.the_title( '', '', false ).'">';
            $image .= get_the_post_thumbnail( $post->ID, 'featured-medium', array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ) ) ).'</a>';
            $image .= '</figure><!-- .post-featured-image -->';
            echo $image;
        } ?>

and after doing this go to line no 238 and can you see this code if ( ! function_exists( ‘ultimate_theloop_for_single’ ) ) :
if yes then goto line no 276 to 287 and replace the old code and add the below code

<?php
        if( has_post_thumbnail() ) {
          $image = '';              
            $title_attribute = apply_filters( 'the_title', get_the_title( $post->ID ) );
            $image .= '<figure class="post-featured-image">';
            $image .= '<a href="' . get_permalink() . '" title="'.the_title( '', '', false ).'">';
            $image .= get_the_post_thumbnail( $post->ID, 'featured-medium', array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ) ) ).'</a>';
            $image .= '</figure><!-- .post-featured-image -->';
            echo $image;
        } ?>

Hope this may help you

Thank you!