WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. vikkineal
    Member
    Posted 5 months 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 5 months 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 5 months ago #

    Thank you :)

Reply

You must log in to post.

About this Plugin

About this Topic

Tags