WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Outputting list of media files as HTML (2 posts)

  1. jbadlands
    Member
    Posted 4 years ago #

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

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

    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

    <ul>
         <?php echo list_of_images(); ?>
    </ul>

    and

    <ul>
        <?php echo list_of_videos(); ?>
    </ul>

    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

  2. MichaelH
    Member
    Posted 4 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic