Support » Fixing WordPress » Outputting list of media files as HTML

  • Resolved jbadlands


    I’m creating a media gallery on my front page. I would like to output something such as

        <a href=""><img src="image_thumnail" alt="" /></a>

    and similar for videos etc (I would like them in seperate lists for each media type)

    I’ve looked over plugins but I think they do a lot more than I need because I will be integrating my media gallery with my own front end interface. I just need to be able to output the html to display my media as list items.

    I envisiage a function in my theme to look something like this

         <?php echo list_of_images(); ?>


        <?php echo list_of_videos(); ?>

    My question is how where would I place these functions and how would I access the data (query the database) within those functions to return the poulated lists? I looked through the worpdress function reference but found nothing that looked like it would help.

    Any suggestions? Thanks

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Outputting list of media files as HTML’ is closed to new replies.