WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Why gallery images automatically assign to default category? (4 posts)

  1. kicksonfire
    Member
    Posted 5 years ago #

    When user are browsing through the images in my gallery of a particular post, I want them to be able to go back to the category of the post itself. For some reason, when i called the category, all my images are shown in the default category. I think this would be very useful for readers as a navigational tool... After they are finished looking at the pictures in a gallery.

    http://www.kicksonfire.com/2008/11/04/air-jordan-6-six-rings-black-dark-army-varsity-red-3/air-jordan-6-six-rings-black-dark-army-varsity-red-2-2/

    Similar to the "Return to the post:", I want it to say "Return to Category" :)

  2. kicksonfire
    Member
    Posted 5 years ago #

    Can this be moved to Wp-Advanced because seems like no one can help me out with this....

  3. yoshi
    Member
    Posted 5 years ago #

    Attachments are always in the default category, they don't get assigned to the same category as their parents.
    To get the categories of the post that the gallery belongs to, just give the parent's ID.

    the_category(',', '', $post->post_parent);
  4. kicksonfire
    Member
    Posted 5 years ago #

    Thank you so much! Works Great :) Thank you for answering !

    Maybe you can help me with this also:
    http://wordpress.org/support/topic/215386?replies=4

Topic Closed

This topic has been closed to new replies.

About this Topic