Getting all the Custom Post Type data (1 post)

  1. pdxbenjaminwp
    Posted 2 years ago #

    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



Topic Closed

This topic has been closed to new replies.

About this Topic