[Support request] Custom Post Type – Make Image Go Above the Title for a Custom Post Type

Home Forums Support Custom Post Type – Make Image Go Above the Title for a Custom Post Type

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

    Hi there,

    1.) On the Blog Page for the Custom Post Type “review”, I’m trying to get the featured image to go above the title and then have it float to the right like I’ve done on the Single Post Page:

    This is what I want the Blog Page to look like:

    The featured image is above the title.

    2.) Once the featured image is above the title, I’d need to get the image to float to the right. I’m guessing this can be done easily with CSS?

    Thanks heaps

    Paul

    #335364
    Tom
    Lead Developer
    Lead Developer

    Hi Paul,

    Looks like it’s working on the page you linked to.

    To do this on the actual blog page, you can set it in Customize > Blog > Featured Images (set to above title, float right).

    Or are you wanting this only to happen on this specific post type and not other post types?

    #335412
    Paul

    Its working on the page I linked to but not:

    Yeah I’m after it for only the Specific Post Type “Review”

    Thanks heaps

    Paul

    #335497
    Tom
    Lead Developer
    Lead Developer

    Try this:

    add_filter( 'option_generate_blog_settings','tu_cpt_featured_image_location' );
    function tu_cpt_featured_image_location( $options ) {
    	
    	if ( 'review' == get_post_type() || is_post_type_archive( 'review' ) ) {
    		$options[ 'post_image_position' ] = 'post-image-above-header';
    		$options[ 'post_image_alignment' ] = 'post-image-aligned-right';
    	}
    	
    	return $options;
    }
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.