Custom Field for Array?

Posted in: Newspaper
Post count: 18

If the “author” field is an array, how can I make “Custom Field” display the values ​​of all the elements in the array?

View post on imgur.com

Post count: 35449

Hi,
Unfortunately, the custom field can not display array, only text, url, email, textarea, number, select, checkbox, radio, and button group.
https://forum.tagdiv.com/custom-fields-support/
Thank you!

Post count: 18

Thanks, Is there any way to add a function or shortcode to a single post template that references a custom post field to display this array field?

Post count: 35449

Hi,

Yes, you can use the Single External Shortcode element on the single post template and set the shortcode there, or directly in column text or text with a title in the text zone.

Thank you!

Post count: 18

Thanks!

Post count: 18

If I use a Single External Shortcode, can I modify its style, fonts, and sizes? This block doesn’t have font options. THANKS!

Post count: 35449

Hi,
If you use a shortcode, you ned to see if he plugin that is providing the shortcode has some options for this, because the holder doesn’t, in this case, the Single External Shortcode
Thank you!

Post count: 18

Thanks

Post count: 18

can i put in “Custom Field” ID of Post?

Post count: 35449

Hi,
Yes, this can be done, but it depends on what you want to achieve. Could you provide some more details?

Post count: 18

Yes, thank you. We need to display the post ID of a custom post using the Custom Field block for future use of that data in other shortcodes.

View post on imgur.com

Thanks

Post count: 18

Sorry, I also need to put the title of the post con “Custom Field” block.

Post count: 35449

Hi,

Is that a page or a template? If you need the post title, it will not be easier to use a flex block 1 and display only the title and you can filter it after the post id you want or better to have less code, you can create a module only with the title https://forum.tagdiv.com/modules-builder-newspaper-theme/ and this can be displayed using the flex builder https://forum.tagdiv.com/flex-block-builder-flex-loop-builder/

Thank you!

Post count: 18

A template of custom POST

Post count: 35449

Hi,

I see, if it is a CPT and the title of the post will change based on the CPT you are then it will be ok to use a custom field to collect the posts you want to display, for example, you can use a text field and it will be in the post IDs only, for example: the custom field must be displayed in each CPT so you can set for each one the post ID you want to display. After that on template use a flex block or create your own module and use a flex builder to display that post or posts, what you need to do is to set in the filter tab some parameters to get the values from your custom field – https://i.imgur.com/7tRPctY.png

Thank you!

Viewing 15 posts - 1 through 15 (of 15 total)
The forum ‘Newspaper’ is closed to new topics and replies.