Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • @ajay

    the empty check on $style_array[‘name’] is solving the issue:

    function crp_heading_styles() {
    
    	$style_array = crp_get_style();
    
    	if ( ! empty( $style_array['name'] ) ) {
    		$style     = $style_array['name'];
    		$extra_css = $style_array['extra_css'];
    
    		wp_register_style( "crp-style-{$style}", plugins_url( "css/{$style}.min.css", CRP_PLUGIN_FILE ), array(), '1.0' );
    		wp_enqueue_style( "crp-style-{$style}" );
    		wp_add_inline_style( "crp-style-{$style}", $extra_css );
    	}
    }
    add_action( 'wp_enqueue_scripts', 'crp_heading_styles' );

    Thanks.

    Hi,

    version v3.0.2

    @ajay
    So, choosing no-style always outputs the link tag as I indicated above, meaning the file name shows just .min.css, leading to a 404.

    On the contrary, choosing a style (for example rounded thumbnails), the link tag is replaced by some inline CSS and everything works fine.

    Additionally, “Related posts should be newer than” now works with a value of 0 too.

    Hope this helps.

    Thank you all.

    Hello,

    experiencing the same on 10 different websites after updating to v3.0.1.

    I confirm that setting the value “Related posts should be newer than” to a big number it partially solves the issue. However, I would prefer to leave it to 0, as it was working fine till now.

    By the way, in the <link> tag I’ve noticed that the CSS has a wrong file name. It just says “.min.css”:

    <link rel='stylesheet' id='crp-style--css' href='/wp-content/plugins/contextual-related-posts/css/.min.css?ver=1.0' type='text/css' media='all' />

    This is of course leading to a 404.

    Hope it may help.

    Thank you all.

Viewing 3 replies - 1 through 3 (of 3 total)