WordPress.org

Forums

Dynamic Featured Image
[resolved] Accessing add_image_size in functions (3 posts)

  1. vikkineal
    Member
    Posted 1 year ago #

    Hi - i may be being daft here, but I can't get the plugin to work when trying to use the 'product-image' size that I've set in my functions file.

    can anyone suggest the best way of referencing a size that isn't the wordpress defaults?

    https://wordpress.org/plugins/dynamic-featured-image/

  2. Ankit Pokhrel
    Member
    Plugin Author

    Posted 1 year ago #

    Hello vikkineal,

    Thank you for using the plugin. I believe you can use wp_get_attachment_image_src( $attachment_id, $size, $icon ) to get the url of the custom size you added in functions.php. The attachment_id is returned by the plugin.

    Thanks,
    Ankit

  3. vikkineal
    Member
    Posted 1 year ago #

    Thank you :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Dynamic Featured Image
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags