• Resolved Driftless

    (@driftless1)


    I want to take photos that are already uploaded in my media library, and associate them with a post, so that I can include them in a “gallery.”

    I know that if you are editing a post, and you upload photos, they will be included in a “Gallery” for that post, so that mus mean that they are tagged somehow in the database: either as “Post## is associated with picutureX, pictureY, pictureZ” or “PictureX is associated with Post##”

    Can anybody point me to where in the database this association is listed, so that I can change it directly in the database, thereby fooling WordPress into thinking those pictures were uploaded from a the particular post I now want to include them in (as a gallery)?

    Clear as mud?

    Thanks!

    (I’ve searched the forum, and have not found a satisfactory answer)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Driftless

    (@driftless1)

    Okay – found it out me-self… I’ll post the solution here, since I know others have had this question.

    The key is that Pictures are logged in the POSTS table with their own Post ‘ID’ number, and are linked to the post or page with the ‘post_parent’ field.

    I found the pictures I wanted in the database, and changed their ‘post_parent’ field to the number of the post or page I wanted to insert the gallery into, and it worked like a charm.

    (Of course, this only works to have the picture in one gallery at a time, and if you change that ‘post_parent’ from a page where the picture is already living, it won’t show up there anymore…)

    Hope people find this useful.

    Thanks…I always appreciate people who post solutions to their problems! Worked great for me!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add Media Library images to a post gallery (Backend?)’ is closed to new replies.