• 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

Adding fields in Property Details | AgentPress

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 › Adding fields in Property Details | AgentPress

This topic is: not resolved

Tagged: Agentpress, AgentPress Listings

  • This topic has 3 replies, 2 voices, and was last updated 9 years, 11 months ago by cyrjm.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • January 12, 2013 at 10:19 am #11452
    cyrjm
    Member

    So I've added my own custom fields in my functions.php file:

    function agentpress_property_details_filter( $details ) {

    $details['col1'] = array(
    __( 'Address:', 'apl' ) => '_listing_address',
    __( 'City:', 'apl' ) => '_listing_city',
    __( 'County:', 'apl' ) => '_listing_county',
    __( 'Intersection:', 'apl' ) => '_listing_intersection',
    );
    $details['col2'] = array(
    __( 'Traffic Counts:', 'apl' ) => '_listing_traffic',
    __( 'Anchors:', 'apl' ) => '_listing_anchor',
    __( 'Total Square Footage:', 'apl' ) => '_listing_sqft',
    );

    return $details;

    }

    What I would like to do is add multiple input boxes for certain fields.  Example, I would like to be able to put another field for Traffic Counts so there are two boxes that you can enter text in the Editor.

    Traffic Counts

    Traffic Count 1

    Traffice Count 2

    Is this possible?

    Cheers!

    JC

    February 21, 2013 at 3:32 pm #22063
    pauldewouters
    Member

    have you tried just adding it like this?

    <code>

    $details['col2'] = array(
    __( ‘Traffic Counts:’, ‘apl’ ) => ‘_listing_traffic’,
    __( ‘Anchors:’, ‘apl’ ) => ‘_listing_anchor’,
    __( ‘Total Square Footage:’, ‘apl’ ) => ‘_listing_sqft’,
    );

    </code>

     

    Or do you mean you want to be able to click an "add" button to dynamically add as many as you like?

     

    February 21, 2013 at 3:33 pm #22064
    pauldewouters
    Member

    have you tried just adding it like this?

    $details['col2'] = array(
    __( ‘Traffic Counts:’, ‘apl’ ) => ‘_listing_traffic’,
    __( ‘Traffic Counts 2:’, ‘apl’ ) => ‘_listing_traffic_2’,
    __( ‘Anchors:’, ‘apl’ ) => ‘_listing_anchor’,
    __( ‘Total Square Footage:’, ‘apl’ ) => ‘_listing_sqft’,
    );

    Or do you mean you want to be able to click an "add" button to dynamically add as many as you like?

    February 22, 2013 at 9:52 am #22243
    cyrjm
    Member

    Paul...that should work...I didn't want an "add" button, just simply another field.  I'll have to give it a shot and see how it looks.

     

    Cheers!

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 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