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?
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?
Volunteer who’s written 1814 tutorials & 3000+ Code Snippets
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.
This probably isn't helpful after 2 years, but I was just wanting to accomplish the same thing and thought I'd share my work-around with you.
I didn't want my client to have to enter the shortcode every time, because anything too technical scares him.
I use Genesis Extender, and I added a hook box into genesis_entry_content with this:
<?php echo do_shortcode( '[property_details]' ); ?>
You must be logged in to reply to this topic.
Subscribe to get early access to new themes, discounts and brief updates about what's new with StudioPress!