• I have two custom post types set; Communities & Homes.
    (I’m Making a Real Estate Site)

    I have a bunch of Communities set up and they use.
    archive-communities.php for the list view, and single-communities.php for the detail view. That works great.

    I have a bunch of homes set up as well, they use archive-home.php and single-home.php. From my index.php page I have set up in the Navigation, Home | Communities | About Us etc and those link to the archive-****.php and all seems to be working fine.

    What I need is on the single-home.php page, the Homes Custom Post Types to have knowledge of their community. I can’t seem to find the correct sql query to pull both the Home information from the Custom Post Type as well as the Community, or how to link them together.
    I’d like to display the logo of the community and address info, on the Home Bio page in single-home.php

    Something like this:

    Community 1
    — Home1
    — Home2
    — Home3
    — etc

    Community 2
    — Home4

    Ect

    Thanks!

  • The topic ‘Getting all the Custom Post Type data’ is closed to new replies.