Skip Navigation

[Résolu] Displaying PHP code from custom fields

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 2 réponses, has 2 voix.

Last updated by Daniel Il y a 8 années et 4 mois.

Assigned support staff: Luo Yang.



I want to show a users rating provided by a rating plugin using this snippet:

<?php echo Rating::item('item-name')->template('mini_rating') ?>

How can I insert this rating and have passed the item-name from a custom field?



Luo Yang

Languages: Anglais (English ) Chinois simplifié (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hi Daniel,

I assume your custom field "item-name" is created by Types, which slug is wpcf-item-name, you can get it's value like this:

echo $value = get_post_meta(get_the_ID(), 'wpcf-item-name', true);


Thanks, working fine.