• Resolved ETO

    (@esmus)


    I created a widget using GenerateBlocks to display the latest posts with featured images on the sidebar. However, there is a conflict where there is only one featured image per line on the sidebar on all pages, but on the blog category pages, there are three images per line as the posts listed on the category pages are arranged in lines of three posts.

    Can you please help me resolve this conflict?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Leo

    (@leohsiang)

    Hi there,

    Sorry but I can’t quite picture the issue you are describing.

    Can you provide the links to the page(s) in question so we can see?

    Thanks!

    Thread Starter ETO

    (@esmus)

    Here is the link.

    • This reply was modified 1 year, 8 months ago by ETO.
    Plugin Support ying

    (@yingscarlett)

    Hi @esmus ,

    Can you try adding this PHP code?

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    add_filter( 'post_class', function( $classes ) {
    	if ( is_archive() && in_array( 'gb-query-loop-item', $classes ) ) {
    		$index = array_search('generate-columns',$classes);
    if($index !== FALSE){
        unset($classes[$index]);
    }
    		
    	}
    
    	return $classes;
    } );

    Thread Starter ETO

    (@esmus)

    Hi, @yingscarlett ,

    I added the code you provided and it fixed the issue. Thank you.

    I hope you will fix this conflict in the future updates so that we do not have to use custom codes.

    Plugin Support ying

    (@yingscarlett)

    Glad it works, we’ll keep it in mind ??

    Plugin Support fernandoazarcon2

    (@fernandoazarcon2)

    Hi there! We haven’t heard back from you for a while now so we’re going to go ahead and set this topic as resolved. Feel free to reply if you need any more help with anything else GP-theme related.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Image block conflicts with blog category’ is closed to new replies.