Support

Account

Home Forums Front-end Issues Selecting an image already saved in media category & displaying front end

Unread

Selecting an image already saved in media category & displaying front end

  • Hi,

    I understand we can create a select option in the form for users to select the name of the image, once submitted the image(s) selected will display on the front end, which is fine and works well using the code below if you have less then 20 to choose from.

    <?php if($sportlogo) { ?>

    <?php if(get_sub_field(‘new_sports_logo’) == “sports_logo”) { ?>/images/sports-logo.png” /><?php } ?>

    But the problem I have is there are more then sports logos that the user will have option to choose from (they can select about 4 -5) they wish to display, these images are categorized in the media library, so what I want to know is that is there an easier way to do this so that I don’t have to manually write up the link to each of the image (like above) and get this done dynamically using the image name and category?

Viewing 1 post (of 1 total)

The topic ‘Selecting an image already saved in media category & displaying front end’ is closed to new replies.