Gallery shortcode and orderby

  • Author
    Posts
  • #223727

    genderoutlaw
    Member

    I have uploaded images and named each file according to the order I would like them to be displayed in when inserted as a gallery. (a-file.jpg, b-file.jpg, c-file.jpg) When these are inserted as a gallery, they are displayed in this order by default:

    c-file.jpg
    a-file.jpg
    b-file.jpg

    Hmm. I have looked at the info about using the gallery shortcode and I see there is this option:

    orderby
    specify the sort order used to display thumbnails. The default is "menu_order ASC, ID ASC".

    So, what are some NON-DEFAULT values for this? I tried

    [gallery orderby="name"]

    and NO gallery images were displayed.

    All comments appreciated!

    #223977

    genderoutlaw
    Member

    Also, when images are inserted via the new image uploader, the alignment doesn’t work (using Hemingway theme.)

    #223978

    genderoutlaw
    Member

    Related to last comment, I replaced class=”alignright” with class=”right” (a class I have manually used previously) and also added margins to the image via inline styles (since they are not included in the “right” class), but inline styles now appear to be stripped?

    #223982

    genderoutlaw
    Member

    And, any way to EXCLUDE an image from a gallery?

The topic ‘Gallery shortcode and orderby’ is closed to new replies.