Skip Navigation

[Closed] How to get the value post field in PHP

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 8 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Beda 8 years, 7 months ago.

Assisted by: Beda.

Author
Posts
#333145

Please help with the plugin Views. I can not find the answer in the documentation.

I have another plugin Popup Press. With it, I create links to pop-ups.

I would like to change the code to the text links displayed value of custom field. Here's the code that displays links:

case 'plain-text':
$button_popup = '<a href="#" class="pps-button-popup-'.$popup_id.' '.$values['pps_button_class'][0].' '.$class_run.'"  title="'.$values['pps_button_title'][0].'">'.$values['pps_button_text'][0].'</a>';
break;

How to change the value button_title and button_text for Views? I can insert shortcodes, but it does not fit here. For example, I would like to insert [wpv-post-field name="myfield"] or [wpv-post-title].

#333330

Thank you for contacting us here in the Support Forum

This code seems from the Source Files of the Plugin, and it calls a $variable for the Title and Diaply Text of the Button.

Aren't those variables editable in a GUI of the Plugin?
It seems trance to me, that you have to edit PHP core files to customize a buttons text or title for it.

You can try to customize this with the Types API:
https://toolset.com/documentation/user-guides/displaying-wordpress-custom-fields/#1

echo types_render_field("custom-field-slug-name", array("argument1"=>"value1","argument2"=>"value2","argument2"=>"value2"));

Another approach if you want to execute a short code is to use wpv_do_shortcode() to execute Views ShortCodes.

But in any case, this is modification of a 3rd party plugin's Core Files, it needs programming work which is beyond the scope of our support.
You could also ask the Plugins Authors on their suggestions how to change those $variables.

At this point I would suggest you consider contacting one of our certified partners from this link:
https://toolset.com/consultant/

You will get the custom assistance you need to get on with your project.

I also highly suspect there must be sort of a GUI where you can change those $variables and if so, you should be able to use any of our short codes as title/text, as long the plugin supports nested short codes.

Please let me know if you have further questions regarding the issue mentioned in this Thread

Thank you for your patience.

The topic ‘[Closed] How to get the value post field in PHP’ is closed to new replies.