Support » Plugin: ACF Recent Posts Widget » [FEATURE] If condition & URL output (& PHP notices error)

  • Hi,

    It all works fine after the last update.
    But I do get an error when using an image ACF field_key in the HTML before & after fields.
    It happens when image is set to display URL and when set to display ID.

    With image field set to URL it throws this error:

    Notice: Undefined index: save_format in /HTML/wp-content/plugins/acf-recent-posts-widget/classes/helpers.php on line 16
    
    Notice: Undefined index: save_format in /HTML/wp-content/plugins/acf-recent-posts-widget/classes/helpers.php on line 18
    
    Notice: Trying to get property of non-object in /HTML/wp-includes/media.php on line 745
    
    Notice: Trying to get property of non-object in /HTML/wp-includes/media.php on line 747

    and when image is set to show ID I get this error (notice):

    Notice: Undefined index: save_format in /HTML/wp-content/plugins/acf-recent-posts-widget/classes/helpers.php on line 16
    
    Notice: Undefined index: save_format in /HTML/wp-content/plugins/acf-recent-posts-widget/classes/helpers.php on line 18

    I have to add that it does work fine, so if I turn WP_Debug off, it will all work nicely.

    Just to let you know!
    Cheers.

    https://wordpress.org/plugins/acf-recent-posts-widget/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author gicolek

    (@gicolek)

    Hey,

    Can you please post an image of your setup?

    Regards.
    Rafal

    Sure!

    link to image of widget setup

    ^ edited: wrong link, fixed now

    Also, is it possible to display the link to the post, something like [acf the_url] ?
    And another question, is an if conditional possible, something like
    [if field_key]<div>[acf field_key]</div>[endif]?

    If you wish I can pose these questions in a different support topic.

    Thanks a lot! 🙂

    Plugin Author gicolek

    (@gicolek)

    Hey waldbach,

    No, these are not supported. You can post these as future requests although.

    I don’t promise that this will be supported at all, as I will need more people to request these actually. Please mark these support tasks with [FEATURE] label.

    And your error is connected with ACF 5, it saves the data in a different way and that’s the reason why it prints out the error.

    You can ignore it for the moment.

    If more people will come to ask me about that I will push and support ACF 5.

    Needless to say I’m not the owner of ACF 5 and I’m not planning to go outside of Beta phase for the plugin yet.

    If you’re a programmer yourself you might take a look a the ‘acf_rwp_before’ and ‘acf_rwp_after’ filters (inside the acf-widget-widget.php) to create this conditions yourself.

    The code can be placed inside the functions.php of your theme.

    Regards,
    Rafal

    Cheers, thanks a lot, especially for the quick responses!

    I will mark this thread with [FEATURE]

    Plugin Author gicolek

    (@gicolek)

    Great,

    Regards!

    Plugin Author gicolek

    (@gicolek)

    Hey Mate,

    I have written a simple blog entry, which may give you an ideas on how could you extend the plugin with the desired yourself: http://wp-doin.com/2015/07/22/customizing-acf-recent-posts/

    Regards,
    Rafal

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[FEATURE] If condition & URL output (& PHP notices error)’ is closed to new replies.