Displaying AgentPress Listings property details (custom fields) in template

Community Forums Forums Design Tips and Tricks Displaying AgentPress Listings property details (custom fields) in template

This topic is: not resolved

This topic contains 3 replies, has 3 voices, and was last updated by  cushtina 1 year, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #24818

    cushtina
    Participant
    Post count: 3

    Instead of using the [property_details] shortcode, I would like to place the property details directly into my template so that they display on each listing automatically. I thought this would be simple (they’re just custom fields!) but I’ve had a pretty hard time with it so far. I can’t even seem to find a Genesis hook that successfully places a new function inside the loop—including the ones I think are supposed to. And I’m not sure I can access the custom fields if I’m not inside the loop.

     Has anyone done this before?

    #25157

    braddalton
    Participant
    Post count: 9915

    No but you can customize the details which isn’t that difficult and i have done this before.

    Whats the reason you don’t want to use the shortcodes?


    #25993

    electricbrick
    Participant
    Post count: 62

    @cushtina You can look into Custom Meta Boxes if you want something a little more automated.

    You may be able to modify the core AgentPress files using CMB as a guide (which isn’t recommended by the devs, btw) as I’ve been doing.

    #26247

    cushtina
    Participant
    Post count: 3

    Thanks. I ended up hardcoding the specific names of the custom fields into functions.php. I would’ve liked to create a loop to run through them and echo whatever’s in there to save a step in case we end up adding or removing anything, but sometimes you can’t have it all, and it’s a relatively small issue.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.