Adding fields in Property Details | AgentPress

Community Forums Forums Design Tips and Tricks Adding fields in Property Details | AgentPress

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  cyrjm 1 year, 5 months ago.

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

    cyrjm
    Participant
    Post count: 6

    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

    #22063

    pauldewouters
    Participant
    Post count: 13

    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?

     

    #22064

    pauldewouters
    Participant
    Post count: 13

    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?

    #22243

    cyrjm
    Participant
    Post count: 6

    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!

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

You must be logged in to reply to this topic.