• Resolved leecrockett

    (@leecrockett)


    I’d like to have the bloglist display all the featured images on the right instead of the alternating right/left. I find it hard to read. Any help would be appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • See this Snippet

    Thread Starter leecrockett

    (@leecrockett)

    That does work, thanks. The images do appear on the right, however there is still some evidence of rows. Every second post is slightly indented.

    Thread Starter leecrockett

    (@leecrockett)

    I didn’t get any response from the forum and continued to dig and find this myself. Here is what I did in case anyone else wants to accomplish the same.

    1. Copied the file /parts/class-content-post_list.php to my child theme

    2. Located the following code starting on line 68:

    //Renders the filtered layout for content + thumbnail
          if ( isset($layout['alternate']) && $layout['alternate'] ) {
            if ( 0 == $wp_query->current_post % 2 ) {
              $this -> tc_post_list_content($post_list_content_class, $tc_show_post_list_excerpt);
              $tc_show_post_list_thumb ? $this -> tc_post_list_thumbnail( $thumb_data , $layout['thumb'] ) : false;
            }

    3. Altered the line:

    if ( 0 == $wp_query->current_post % 2 )

    to read:

    if ( 0 == $wp_query->current_post % 1)

    Rather than changing the core files, you can use the filter that is built for this. Add the following to your functions.php:

    add_filter( 'tc_post_list_layout', 'my_post_list_layout');
    function my_post_list_layout() {
    	return array(
       'content'           => 'span8',
       'thumb'             => 'span4',
       'show_thumb_first'  => false,
       'alternate'         => false
    	);
    }

    The first 3 have their default values; the last is changed.

    If you want the images before the post, set 'show_thumb_first' to true.

    Thread Starter leecrockett

    (@leecrockett)

    Brilliant!!

    That certainly does the trick. Thanks so much. Still struggling with the featured images, but I know we’ll get there!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Left/Right image in blog list’ is closed to new replies.