Showing custom fields description in listings

WordPress Business Themes Forums Responsive Themes Auction Theme Showing custom fields description in listings

Showing custom fields description in listings

November 30, 2017
 Marta

  • 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.
    November 30, 2017 at 8:33 pm
  • JamesD
    JamesD
    Super Guru 913 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.
    November 30, 2017 at 11:38 pm

  • 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

    December 2, 2017 at 3:04 pm
  • JamesD
    JamesD
    Super Guru 913 points

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

    <div>Age:  [age]</div>
    December 3, 2017 at 7:31 pm
Viewing 4 posts - 1 through 4 (of 4 total)

Didn't find what you were after?

Chat with us now

or contact our support team