• Hi,?

    Im making a site for an art gallery and have run into a problem.

    I basically need to come up with a way to have a post within a post. This is because each artist will be added as a post, meaning that single.php will display all of their artwork. However, each piece of art also needs to be a post, so when a user clicks on an artwork image, that piece of arts details are displayed.

    You can see what I mean if you visit

    http://www.john-barker.com/eagle-artists/gallery-artist.php

    This page will be single.php and display all of the artists details and biography. Hwever, it needs to work as it does now so that if you click on a image, you are taken to another single.php page which will display details of that work of art.

    Does anybody have any idea how I would go about this – basically displaying a post within a post. All help is greatly appreciated.

    Thanks

Viewing 1 replies (of 1 total)
  • I suggest you add each artist as a page and a category. Put the main info about the artist on the artist’s page. Have the artists’s page be a custom page template. Have each individual image be its own post, assigned to the category for that artist. Using a custom query on the custom page template, after the artist info has displayed, display the post summary of each image in turn – the summary would be just the image with a “click here for more” which when clicked opens the single.php for that image and displays the full details.

    You could also have the info for the artist itself be a post in the same category rather than a separate page per artist. But using a page creates a natutal navigation structure. If you aren’t have loads of artists it would probably work better long term.

    custom page template:
    http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

    custom queries:
    http://weblogtoolscollection.com/archives/2008/04/13/define-your-own-wordpress-loop-using-wp_query/

Viewing 1 replies (of 1 total)

The topic ‘Posts within posts – please help’ is closed to new replies.