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

#25737

Hi aris,

We cannot provide you all step by step. For this you need to hire a developer.
First of all create two files styles.css and functions.php file
under functions.php file add this code
unhook this functions
add_action( 'ultimate_loop_content', 'ultimate_theloop', 10 ); with `remove_action( ‘ultimate_loop_content’, ‘ultimate_theloop’, 1
0 );`

After doing it add this code add this code

add_action(‘init’,’unhook_thematic_functions’);

add_action( 'ultimate_loop_content', 'ultimate_loop_content_child', 10 );
/**
 * Shows the loop content
 */
function ultimate_loop_content_child() {
	if( is_page() ) {
		if( is_page_template( 'page-templates/page-template-blog-image-large.php' ) ) {
			ultimate_theloop_for_template_blog_image_large();
		}
		elseif( is_page_template( 'page-templates/page-template-blog-image-medium.php' ) ) {
			ultimate_theloop_for_template_blog_image_medium();
		}
		elseif( is_page_template( 'page-templates/page-template-blog-full-content.php' ) ) {
			ultimate_theloop_for_template_blog_full_content();
		}
    else {
    ultimate_theloop_for_page();
    }
	}
	elseif( is_single() ) {
		ultimate_theloop_for_single();
	}
	elseif( is_search() ) {
		ultimate_theloop_for_search();
	}
	else {
		ultimate_theloop_for_archive();
	}
}

Now your child theme funtions is ready. Now go to the theme folder -> inc -> structure -> content-extension.php on line no 86 you will find this code

/****************************************************************************************/
if ( ! function_exists( 'ultimate_theloop_for_archive' ) ) :

and copy from this line 86 to line no 735 where in line no 735 you will find this code.

      $wp_query = $temp_query;
      wp_reset_postdata();
}
endif;
/****************************************************************************************/

Are you still with me? Ok then you need to change the code in your functions.php file
under this functions
if ( ! function_exists( 'ultimate_theloop_for_archive' ) ) : can you see this code line no 134 to 143, there you replace 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;
} ?>` with

<?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;
  		} ?>

with

 <?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;
        } ?>

Paste this code for single functions too on line no 238
if ( ! function_exists( 'ultimate_theloop_for_single' ) ) :
Add the above code just you have done it now

 <?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;
        } ?>

Thank you!