Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • Vince Chittenden
    Participant

    Hi,

    Some of my posts have more than one value for a custom field of the same name. EG see screenshot – for that post shown there are 4 different values for a custom field called “cols”.

    Screenshot

    Is there any way I could display all the values in my post? Preferably with the ability to put commas or linefeeds between each one?

    Cheers
    Vince

    Hi Vince,

    I understand the requirement. But such functionality is not available/possible with the plugin. The ability to pull custom field value is designed for very simple usecases.

    Anything beyond that would involve complexity for most users like delimiter, formatting, HTML etc., 🙂

    Hence I would suggest advanced users write a small shortcode using PHP with full control over the output.

    Below are some docs related to that.

    Creating a shortcode with parameters:
    https://wordpress.stackexchange.com/a/172920/3914

    Fetching custom field value:

    get_post_meta()

    Adding the custom PHP code to your website:

    How to Add Custom Code in WordPress with Site-Specific Plugin?

    Thanks,
    Aakash

    Vince Chittenden
    Participant

    Hi Aakash,

    Thanks for your very detailed reply

    Regards,
    Vince

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Subscribe for updates

Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter