• Resolved dan1982

    (@dan1982)


    Could I request that there be a way to link the layout thumbnails to a theme folder url (saving the location in the exported json data)
    I develop for clients with the same base template and it gets a little tiresome putting in the thumbnails and relinking them all. Plus I would personally prefer to have them outside of the media gallery when the client can’t see them, or accidentally delete them.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback! Well I got a news, you can already use the following hook to use external thumbnails images in your Flexible Content Dynamic Render:

    // add_filter('acfe/flexible/thumbnail/name=my_flexible',                   'acf_flexible_layout_thumbnail', 10, 3);
    // add_filter('acfe/flexible/thumbnail/key=field_xxxxxx',                   'acf_flexible_layout_thumbnail', 10, 3);
    // add_filter('acfe/flexible/thumbnail/name=my_flexible&layout=my_layout',  'acf_flexible_layout_thumbnail', 10, 3);
    // add_filter('acfe/flexible/thumbnail/key=field_xxxxxx&layout=my_layout',  'acf_flexible_layout_thumbnail', 10, 3);
    
    add_filter('acfe/flexible/thumbnail/layout=my_layout', 'acf_flexible_layout_thumbnail', 10, 3);
    function acf_flexible_layout_thumbnail($thumbnail, $field, $layout){
    
        // Must return an URL or Attachment ID
        return 'https://www.example.com/my-image.jpg';
    
    }
    

    You’ll find more code examples for advanced usage in the plugin’s FAQ.

    Hope it helps!

    Have a nice day.

    Regards

    Thread Starter dan1982

    (@dan1982)

    Thanks for that. I apologise for not doing a search first, I see this has already been answered.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    No problem, I’m kinda used to it by now 🙂

    This is why I’m also working hard on a better documentation!

    Have a nice day!

    Regards.

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

The topic ‘Feature request: Layout thumbnail from folder url’ is closed to new replies.