WordPress.org

Ready to get started?Download WordPress

Forums

Gallery object permalinks ? (2 posts)

  1. joosep
    Member
    Posted 1 year ago #

    First of all, Hi !
    Im making my first WP and I am little stuck.

    I get nice permalinks for my galleries, but as I will make only one gallery then I would like to have permalinks to my gallery objects too.
    Is there any way to do this ?

    (I mean I want to be able to share a permalink that will direct people straight to that picture in the gallery.)

    Thanks in advance,
    Joosep

    PS. Running the newest version.

  2. Scott Fennell
    Member
    Posted 1 year ago #

    An image in a gallery is, itself, a post. It has the post type 'attachment' and is a child of the post to which it was attached. Use get_children:

    http://codex.wordpress.org/Function_Reference/get_children

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.