Meta Key Not Displaying Looper

Hey team,

I can’t seem to get a custom post’s custom taxonomy to appear with the looper {{dc:post:meta key=“my-custom-taxonomy-slug”}}.

The key itself appears in the dropdown (twice, actually, once with a leading underscore and once without), but neither actually output the content.

Help, please!

Hi @kjroelke,

Would you mind first updating to the latest point release? There was an issue where sometimes custom fields wouldn’t pull through if a post looper was used on the page (like one of the Posts elements). That could be what you’re experiencing here.

Otherwise, could you explain a bit more about how your custom field is setup? Is is a WordPress Custom Field, or from a plugin? For a bit of context, if we look at this:

{{dc:post:meta key="meta_key"}}

It will basically do this under the hood:

get_post_meta( $post->ID, 'meta_key', true );

It should simply output a string representation of whatever is stored there. If nothing outputs, it could be because of the aforementioned bug (fixed in the latest point release) or perhaps that nothing is in fact stored in the field.

Currently running Pro 4.0.10 on staging1.sumc.co.

I’m using CPTUI and ACF: I’ve built a custom “Messages” post type and have two custom taxonomies, “Sermon Series” and “Speakers.”

I’m trying to build custom Singles that have pull those two custom fields in to the post type. I will also need to build an Archive of each Custom Field that pulls in related posts and their custom fields (e.g. a “Speaker” archive for person that pulls in all related “messages” posts and their associated “sermon series”).

Hello @kjroelke,

Please have your theme updated to Pro theme 4.0.11.

If you want to display custom fields, you can use the example dynamic content code given by @Alexander.

{{dc:post:meta key="meta_key"}}

And if you would want to display and ACF field, it should like this:

{{dc:acf:field field="name"}}

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.