Support Forum ยป User Profile

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: One random image from an Image Advanced field in Oxygen #29580
    IlanIlan
    Participant

    FINALLY GOT IT!

    For the next person with this problem, i got there in the end using views, just forgot to add the field name to the random function

    {% set group = attribute( site, 'practice-specific-images' ) %}
    {% set item = random(group.gallery) %}
        <img src="{{ item.full.url }}" width="100%" height="auto" alt=""> 

    `

    in reply to: One random image from an Image Advanced field in Oxygen #29578
    IlanIlan
    Participant

    I think I'm getting closer - using MB Views I'm trying to output a random item from the array.

    {% set group = attribute( site, 'practice-specific-images' ) %}
    {% set item = random(group) %}
        <img src="{{ item.full.url }}" width="100%" height="auto" alt=""> 
     

    unfortunately this is not giving me anything on the front end, viewing the source give me "unknown" for the URL.
    Saved as a shortcode for easy use in Oxygen.
    I feel like i'm so close here - any suggestions you can offer?

    in reply to: One random image from an Image Advanced field in Oxygen #29577
    IlanIlan
    Participant

    Ya I'm totally lost here - can you help me out please? What changes would I make to the snippet to have it work with metabox and pulling images from the settings page fields?

    in reply to: One random image from an Image Advanced field in Oxygen #29483
    IlanIlan
    Participant

    Ya it looks like this one is above my head. I'll have to hope someone makes a video tutorial for me one day ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)