Featuring favorite pictures on smugmug

Featuring my favorite pictures

(featuring a keyword gallery)

I wanted to have a section on my home page which featured my favorite pictures… but I didn’t want to go through the labor of duplicating each picture into a new gallery to feature. After doinking with CSS for a while (and coming up very empty handed) I stumbled across David’s automatic “recent” featured gallery. Brilliant! As a result, I give all credit to David since I really just trimmed and modified his code for this. Basically I modified David’s code to show a keyword gallery instead of a timeline gallery. You could, of course, use this for any keyword you choose.

You can see it in action on my site.


Requirements: A smugmug power user account and a sense of adventure.


  1. Download the two pre-made smugmug files for this:
    1. for the custom JS field: forJavaScriptSection.txt
    2. for the footer field: forFooterSection.txt
  2. Log into your smugmug site (sure, obvious)
  3. Click the control panel link
  4. In the “organize & customize” section, click the “customize” link.
  5. Open smugmug file “a” using notepad (Windows) or TextEdit (Macintosh)
  6. Copy all the text from smugmug file “a” (forJavaScriptSection.txt) and paste it into the javascript section of the customization settings page
  7. Modify the second-to-last line of the text you just pasted to include your own gallery title, description, keyword and thumbnail
    i.e. Change the variables for the function “addKeywordFeatured”
  8. Copy all the text from smugmug file “b” (forFooterSection.txt) and paste it into footer section of the customization settings page
  9. Modify the footer section to change the square brackets ([ ]) to angle brackets (< >)
    i.e. [script] becomes <script>
  10. Click the “Update” button at the bottom of the customize page
  11. Finally, make sure you have at least one of your galleries featured.  The technique I used requires the featured section to exist. 
    Note: If you don’t want to have featured galleries and would, instead, like to have your favorites gallery included in the “gallery categories” section I’ve created a separate set of JavaScript you should instead use in step 6: forJavaScriptSection-Gallery.txt.

Leave a Reply

Your email address will not be published. Required fields are marked *