• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Displaying AgentPress Listings property details (custom fields) in template

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

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

This topic is: not resolved

Tagged: Agentpress, AgentPress Listings, Custom fields, customization, functions, genesis hooks, hooks, property details, shortcode, template

  • This topic has 4 replies, 4 voices, and was last updated 7 years, 8 months ago by carachristenson.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • March 7, 2013 at 12:35 pm #24818
    cushtina
    Member

    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?

    March 9, 2013 at 12:06 am #25157
    Brad Dalton
    Participant

    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?


    Get Help – Book Consultation.

    March 13, 2013 at 2:56 pm #25993
    electricbrick
    Participant

    @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.

    March 14, 2013 at 12:26 pm #26247
    cushtina
    Member

    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.

    May 28, 2015 at 12:50 pm #154004
    carachristenson
    Member

    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]' ); ?>

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble