WordPress.org

Ready to get started?Download WordPress

Forums

Embed the image gallery from a page onto a static/home page (2 posts)

  1. cyndimarie
    Member
    Posted 2 years ago #

    I am creating a website for a small business. They have a page displaying an image gallery of their past customers.

    I want to be able to display a few (say the 4 most recent) thumbnails from that gallery in a widgetized area on the home page.

    That way as they add more images to the gallery page, the home page is updated as well. This needs to be very minimal in upkeep.

    Anyone know how I could achieve this? Is there a plugin, or a way to add a shortcode that is specific to that gallery.

    More info: theme is Corporate theme on the Genesis Framework.

  2. cyndimarie
    Member
    Posted 2 years ago #

    Ok I have figured it out to a point.

    I have enabled shortcode use in my widgetized areas.

    Here's the code I'm using to display the gallery on the home page:

    <div>
    <style type="text/css">#gallery-1 { margin:auto;} #gallery-1 .gallery-item { float: left; margin-top: 10px; text-align: center; width: 20%; } #gallery-1 img { border: 2px solid #cfcfcf; } #gallery-1 .gallery-caption { margin-left: 0; }
    </style>
    [gallery id="19" columns="5" link="file" order="DESC" orderby="ID"]
    </div>

    This is all working just how I want it, except it is displaying all the thumbnails in the gallery, and I only want the 5 most recent images displayed.

    Anyone know how to do that?

Topic Closed

This topic has been closed to new replies.

About this Topic