Forum Replies Created

Viewing 15 replies - 31 through 45 (of 54 total)
  • Thread Starter mhair

    (@mhair)

    Have also tried it without the the size “medium” parameter….

    Thread Starter mhair

    (@mhair)

    Andy,

    This is still not outputting any thing for the srcset attribute. It is simply returned empty.

    Can you show me what code you’re using for srcset in the header.php? This what I’m using that produces “empty”.

    `<a href=”<?php echo esc_url( home_url( ‘/’ ) ); ?>” rel=”home”>
    <img src=”<?php header_image(); ?>”
    srcset=”<?php echo esc_attr( wp_get_attachment_image_srcset( get_custom_header()->attachment_id, ‘medium’ ) ); ?>”
    sizes=”<?php echo esc_attr( $custom_header_sizes ); ?>”
    alt=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>”>
    </a>`

    Thread Starter mhair

    (@mhair)

    Andy,

    This is awesome, I will give it a try today! Yes, you were right that the code was from twenty sixteen. I really don’t think your plugin was outputting anything for me on Friday, but will try again today and let you know what I find.

    Thread Starter mhair

    (@mhair)

    Correction: I had multiple copies of custom header code in different places. When I removed both, then activated the plugin, I now have no custom headers interface via appearance > customize or appearance > headers …..meaning these menu items don’t even exist in the admin.

    I’ve reviewed your code and the premise for this technique seems sound and encouraging for making srcset finally work with custom headers. Just need to get the plugin working!

    What could be wrong?

    Thread Starter mhair

    (@mhair)

    Nope, does solve the issue. It seems to be because wp_get_attachment_image_srcset requires and attachment_id, but header images are unattached?

    Currently experimenting with this plugin as a possible solution since it uses images as attached to a token/private page. No luck so far but I may not be using it properly.

    Any input from anyone in a similar situation, or from the author of WP Retina 2x?

    Thread Starter mhair

    (@mhair)

    OK, upon a ton of searching, I think I found what may be the answer….that wordpress left out header images as a use case for responsive images with srcset. Will try it tomorrow and report results.

    https://stackoverflow.com/questions/37707601/wordpress-add-responsive-srcset-header-image-to-theme

    FWIW, I’m having the same issue but cannot find the solution!

    Hey there Matt,

    I didn’t notice you were the author of this plugin. Sorry for the duplicate post above.

    So the funny thing is I came to this plugin from Single Thumbnail Gallery, reading elsewhere that it was not intended to handle multiple images. Strange I thought considering that it is a foogallery extension which is all about multiple images.

    Anyway, I’ve not been able to get it (single thumbnail gallery) working as a shortcode in the header.php (using do_shortcode). It displays the first image well enough, but doesn’t then do any of the foobox animated captions on rollover, nor the foobox on click. Do you know if it can be used in a header.php (outside the loop?) I’ll post over on my foogallery as well, but thought I’d ask if you had any experience with this.

    wpriley,

    I’m currently experiencing exactly the same thing. Very frustrating as I’d hoped this would provide what I need. Is the author supporting this?

    wpriley,

    I’m currently experiencing exactly the same thing. Very frustrating as I’d hoped this would provide what I need. Is the author supporting this?

    I would appreciate the same information.

    Thread Starter mhair

    (@mhair)

    OK, you’re right. I tried it in a different site and it worked fine, so must be a plugin on current site. I’ll mark resolved.

    Thread Starter mhair

    (@mhair)

    Turns out that it was some error show in the list of sidebars of the same name that were in draft. Unfortunately don’t have the exact wording, but were listed in red with something about updating the display host. I deleted them and was able to add the resources sidebar.

    Thread Starter mhair

    (@mhair)

    Thanks Stephanie. I’ve deleted the wp_terms per above and updated the new plugin. However, when I updated, I got new errors. Deactivating made the errors go aways, so they’re definitely related. Could you please take a look.

    entuserinfo is <strong>deprecated</strong> since version 4.5! Use wp_get_current_user() instead. in C:\Users\mhair.ICS\Documents\Websites\removed\wp-includes\functions.php on line 3662
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0070	323336	{main}( )	..\plugins.php:0
    2	0.0070	367432	require_once( 'C:\Users\mhair.ICS\Documents\Websites\removed\wp-admin\admin.php' )	..\plugins.php:10
    3	0.8261	21235176	do_action( )	..\admin.php:168
    4	0.8311	21356168	call_user_func_array:{C:\Users\mhair.ICS\Documents\Websites\removed\wp-includes\plugin.php:525} ( )	..\plugin.php:525
    5	0.8311	21356224	content_audit_taxonomies( )	..\plugin.php:525
    6	0.8311	21356328	get_currentuserinfo( )	..\content-audit-fields.php:148
    7	0.8311	21356576	_deprecated_function( )	..\pluggable-deprecated.php:49
    8	0.8311	21356992	trigger_error ( )	..\functions.php:3662
    
    ( ! ) Notice: get_currentuserinfo is <strong>deprecated</strong> since version 4.5! Use wp_get_current_user() instead. in C:\Users\mhair.ICS\Documents\Websites\removed\wp-includes\functions.php on line 3662
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0070	323336	{main}( )	..\plugins.php:0
    2	0.0070	367432	require_once( 'C:\Users\mhair.ICS\Documents\Websites\removed\wp-admin\admin.php' )	..\plugins.php:10
    3	0.8261	21235176	do_action( )	..\admin.php:168
    4	0.8341	21356768	call_user_func_array:{C:\Users\mhair.ICS\Documents\Websites\removed\wp-includes\plugin.php:525} ( )	..\plugin.php:525
    5	0.8341	21356872	content_audit_boxes( )	..\plugin.php:525
    6	0.8341	21356872	get_currentuserinfo( )	..\content-audit-fields.php:169
    7	0.8341	21357048	_deprecated_function( )	..\pluggable-deprecated.php:49
    8	0.8341	21357360	trigger_error ( )	..\functions.php:3662
    
    ( ! ) Notice: get_currentuserinfo is <strong>deprecated</strong> since version 4.5! Use wp_get_current_user() instead. in C:\Users\mhair.ICS\Documents\Websites\removed\wp-includes\functions.php on line 3662
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0070	323336	{main}( )	..\plugins.php:0
    2	0.0070	367432	require_once( 'C:\Users\mhair.ICS\Documents\Websites\removed\wp-admin\admin.php' )	..\plugins.php:10
    3	0.8261	21235176	do_action( )	..\admin.php:168
    4	0.8371	21361904	call_user_func_array:{C:\Users\mhair.ICS\Documents\Websites\removed\wp-includes\plugin.php:525} ( )	..\plugin.php:525
    5	0.8371	21362040	content_audit_column_setup( )	..\plugin.php:525
    6	0.8371	21362040	get_currentuserinfo( )	..\content-audit-report.php:55
    7	0.8371	21362216	_deprecated_function( )	..\pluggable-deprecated.php:49
    8	0.8371	21362528	trigger_error ( )	..\functions.php:3662
    
    ( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\Users\mhair.ICS\Documents\Websites\removed\wp-includes\functions.php:3662) in C:\Users\mhair.ICS\Documents\Websites\removed\wp-includes\option.php on line 823
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0070	323336	{main}( )	..\plugins.php:0
    2	1.2561	21890232	require_once( 'C:\Users\mhair.ICS\Documents\Websites\removed\wp-admin\admin-header.php' )	..\plugins.php:409
    3	1.2571	21891248	wp_user_settings( )	..\admin-header.php:58
    4	1.2581	21891712	setcookie ( )	..\option.php:823
    
    ( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\Users\mhair.ICS\Documents\Websites\removed\wp-includes\functions.php:3662) in C:\Users\mhair.ICS\Documents\Websites\removed\wp-includes\option.php on line 824
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0070	323336	{main}( )	..\plugins.php:0
    2	1.2561	21890232	require_once( 'C:\Users\mhair.ICS\Documents\Websites\removed\wp-admin\admin-header.php' )	..\plugins.php:409
    3	1.2571	21891248	wp_user_settings( )	..\admin-header.php:58
    4	1.2601	21891752	setcookie ( )	..\option.php:824
Viewing 15 replies - 31 through 45 (of 54 total)