Okay
  Public Ticket #2444133
ACF Field Not Showing In Widget
Closed

Comments

  • Andre started the conversation
    • I have created a Guitar Lesson post type 
    • create custom field group
      • artist
      • key
      • related post (that I can select manually)
    • In the guitar lesson post template
      • inserted the bullet list widget
      • added the amount of items needed
      • for the content selected the custom fields I created

    the only field I can't find is the "related post" field (see attachments). I am unsure what to do so show that link in the list, please advise.


  •   Max replied privately
  •   Andre replied privately
  •   Max replied privately
  •   Andre replied privately
  •   Max replied privately
  •   Andre replied privately
  •   Andre replied privately
  •   Andre replied privately
  • Andre replied

    After a lot of tryouts I figured it out: 

    To show the content type before the custom post title I did the following in the widget.

     <div class="uc_image_carousel_content" >
        {% if show_title == "true" %}<div class="uc_post_title">

    {% set terms = getPostTerms(item.post.id, "content_type", true) %}

    {% for term in terms %}

    {{term.name}}

    {# also you can use term meta fields #} 
    {% set meta_fields = getTermMeta(term.id) %} 
    {{meta_fields.fieldname}} 

    {% endfor %}
    : {{item.post.title|raw}}</div>{% endif %}


  •   Max replied privately