Showing custom fields description in listings


  • Marta
    Newbie
     
    4 points

    Hello, Do anybody knows if it is possible to show the description of custom made fields on listing page. please see attachments.
    thx

    Attachments:
    You must be logged in to view attached files.

    JamesD
    JamesD
    Titan
     
    652 points

    Hello Marta,

    To display custom fields you’ll need to add shortcodes to the listing template.

    Note: Always make a backup of the files you’ll be editing before starting!

    1. Place a copy of ‘/AT/content-listing-auction.php’ into your child theme.
    2. Open the new file (the one copied to your child theme) and you’ll see the template html for the listings.
    3. Make whatever changes needed. Note: to add the custom field use brackets ([]) around the custom field database key (DB key). The database key must match, so character case does matter. For example, if I had a custom field with the DB key of ‘boogaboo’ then I’d use [boogaboo] and if I had a custom field with the DB key of ‘BoogAbOO’ then I’d use [BoogAbOO].
    4. Save file.


    Marta
    Newbie
     
    4 points

    Hello and thank you for the information. Basically works good. The only thing I don’t know how to fix is, if I give for example from custom fields the DB [Age_years] it shows the number (6 years) but not the custom field name as Age : 6 Years
    How can I make it showing the name too?
    thx


    JamesD
    JamesD
    Titan
     
    652 points

    You need to manually add any other type of language and/or styling.
    For example:

    <div>Age:  [age]</div>

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

You must be logged in to reply to this topic.