• First of all, thank you so much for the plugin, there was definitely a need in the WordPress community for this functionality!

    RICG works great on my site’s posts and pages, but it causes a problem with the Genesis Responsive Slider. Does RICG plugin work inside image sliders?

    To add images to the Genesis Responsive slider you need to create a post, add an image inside it and then the image gets displayed as a slider image.
    Once I installed RICG I followed the same process as above to add slides. The code that generates the image now looks like this:

    <img class="alignnone size-full wp-image-35"
    src="https://tdatacenter/wpcontent/uploads/2015/03/background_abstract_final.jpg"
    srcset="https://tdatacenter/wpcontent/uploads/2015/03/background_abstract_final-300x115.jpg 300w,
    https://tdatacenter/wp-content/uploads/2015/03/background_abstract_final 1024x393.jpg 1024w,
    https://tdatacenter/wp-content/uploads/2015/03/background_abstract_final-1599x613.jpg 1599w,
    https://tdatacenter/wp-content/uploads/2015/03/background_abstract_final.jpg 1599w"
    alt="abstract connectivity" width="1599" height="613" data-sizes="(max-width: 1599px) 100vw, 1599px" />

    ..which seems to be the correct use of srcset, BUT actually it does not display any image at all. It displays just the name of the post, and when I inspect it with chrome dev tools, there is no source for the image(very strange) and it looks like this:

    <div class= "slide-image"><img src alt></div>

    Do you think this problem is caused by the slider? Cause it has 2 options that require maximum slider width(px) and maximum slider height(px)? And maybe this is blocking RICG from working..

    Thank you.

    P.S Couldn’t provide a site URL, because I’m working on localhost

    https://www.ads-software.com/plugins/ricg-responsive-images/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Joana,

    First of all, I’m sorry that I intervene here. I am a bit disparate because I want to solve the problem before 21 of April.

    Because you use Genesis (I do the same), and you make this plugin work out for you on posts and pages, can you help me to achieve that too?
    I will highly appreciated it if you can help me.

    I start this topic, but still no help.

    Below is how I display the loop on the blog page

    <?php
    // Update Image Sizes
    	update_option( 'thumbnail_size_w', 215, true );
    	update_option( 'thumbnail_size_h', 135, true );
    	update_option( 'medium_size_w', 300, true ); //mobile single
    	update_option( 'medium_size_h', '', true );
    	update_option( 'large_size_w', 800, true ); //desktop single
    	update_option( 'large_size_h', '', true );
    
    	add_image_size('grid-thumbnail', 215, 135, true); //loop thumbnail
    	add_image_size('mobile-thumbnail', 300, 188, true); //loop thumbnail mobile
    	add_image_size('sidebar-thumbnail', 336, 194, true); //single sidebar
    	add_image_size('grid-thumbnail-x2', 430, 270, true); //loop thumbnail
    	add_image_size('mobile-thumbnail-x2', 600, 376, true); //loop thumbnail mobile
    	add_image_size('sidebar-thumbnail-x2', 672, 388, true); //single sidebar
    
    	//* Add support for Genesis Grid Loop
    remove_action( 'genesis_loop', 'genesis_do_loop' );
    add_action( 'genesis_loop', 'child_grid_loop' );
    
    function child_grid_loop() {
    
    	//* Global vars
    	global $_genesis_loop_args;
    
    	//* Parse args
    	$args = apply_filters(
    		'genesis_grid_loop_args',
    		wp_parse_args(
    			$args,
    			array(
    
    				'grid_image_size'		=> 'grid-thumbnail',
    				'grid_image_class'		=> 'alignleft',
    				'grid_content_limit'	=> 0,
    				'more'					=> '',
    			)
    		)
    	);
    
    	//* What page are we on?
    	$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
    
    	//* Set global loop args
    	$_genesis_loop_args = $args;
    
    //hooks and filters for 
    
    remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
    add_action( 'genesis_entry_header', 'genesis_do_post_image', 8 );
    remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
    remove_action( 'genesis_entry_content', 'genesis_do_post_content_nav', 12 );
    remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
    remove_action( 'genesis_entry_content', 'genesis_do_post_content_nav', 12 );
    remove_action( 'genesis_entry_content', 'genesis_do_post_permalink', 14 );
    remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );
    remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );
    remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
    	//* The loop
    	genesis_standard_loop();
    
    	//* Reset loops
    	//genesis_reset_loops();
    	remove_filter( 'post_class', 'genesis_grid_loop_post_class' );
    	remove_action( 'genesis_post_content', 'genesis_grid_loop_content' );
    	remove_action( 'genesis_entry_content', 'genesis_grid_loop_content' );
    }

    And on this template page I use a genesis_custom_loop:

    <?php
    /*
    	Template Name: Top 2015
    */
    add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
    remove_action( 'genesis_loop', 'genesis_do_loop' );
    add_action( 'genesis_loop', 'top_2015_do_loop' );
    add_filter( 'post_class', 'wwhd_post_class' );
    remove_action( 'genesis_post_title', 'genesis_do_post_title' );
    remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
    remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
    function wwhd_top_2015_description() {
    echo '<h2 class="archive-description">WallWideHD.com Most Popular Wide and HD Wallpapers from 2015. Find High Resolution images to set them as your desktop or mobile device background.</h2>';
    }
    add_action( 'genesis_before_footer', 'wwhd_top_2015_description', 0 );
    function top_2015_do_loop() {
    
    	global $paged;
    	global $_genesis_loop_args; // grab the current wp_query() args
    
    	$args = apply_filters(
    		'genesis_grid_loop_args',
    		wp_parse_args(
    			$args,
    			array(
            'category__not_in' => '33,158',
    		'posts_per_page' => 20,
    		'meta_key' => 'post_views_count',
    		'orderby' => 'meta_value_num',
    		'order' => 'DESC',
    		'date_query'     => array( array('after'     => 'January 1st, 2015', 'before'    => 'December 31, 2015')),
    		'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 ),
        )));
    	add_action( 'genesis_entry_header', 'genesis_do_post_title' );
    	add_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
    	add_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
        genesis_custom_loop( $args) ;
    
    }
    
    genesis();

    And finally on single post I call the image like this:

    genesis_image( array( 'size' => 'large', 'attr' => array ('class' => 'centered', 'alt' => $title,'title' => $title, 'onContextMenu' => "alert('Please use the Download button bellow for full resolution. Thanks!');return false;") ) );

    After all of this I don’t get responsive images or the srcset attribute in the code.

    Thank you in advance,
    Gabriel

    Thread Starter joanaBeshaj

    (@joanabeshaj)

    Hello @maruscagabriel,

    When you use RICG plugin you need to upload the images from the beginning in the posts/pages that were created before you added RICG to wordpress. I noticed that in some earlier pages I had published, images were not responsive and the srcset was missing from the code, BUT once I deleted those image from the page and uploaded them again, the srcset was working.
    I hope this helps, but if it doesn’t you can ask to the Genesis Forum or file a ticket to their support team, they generally send you a replay by tomorrow.

    P.S, I am new to PHP so I can’t really figure out if there’s something wrong with your code :/

    Thank you Joana.
    I try your suggestions, but, unfortunately, doesn’t work. I also ask on Genesis Forum and got no answer yet. I will try to fill a support ticket.
    Thanks again, and good luck to find a solution for your problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Incompatibility with Genesis Responsive Slider’ is closed to new replies.