• Resolved inula

    (@janetb)


    Hello,

    I’m using catlist with a template.
    In this template I’m reading my custom fields: $lcp_display_output .= $this->get_custom_fields($post);

    On a page I display the customfields using [catlist customfield_display_name="yes"].

    Instead of the NAME, I would like to use the LABEL.
    That label is used on the edit screen.
    How do I display that label on my page?
    F.i.: [catlist customfield_display_label="yes"] this doesn’t do the trick

Viewing 3 replies - 16 through 18 (of 18 total)
  • Thread Starter inula

    (@janetb)

    Delete following line from your custom template:

    $lcp_display_output .= $this->get_custom_fields($post);

    Replace for every customfield with:

    $field_object = get_field_object( 'Met', $post->ID );
    $lcp_display_output .= $field_object['label'];
    $lcp_display_output .= $field_object['value'];

    Again, where Met is the name of the customfield

    • This reply was modified 2 years, 4 months ago by inula.

    Thank you very much! Everything worked out!

    Thread Starter inula

    (@janetb)

    Glad I could help ??

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Customfields name or label’ is closed to new replies.