jeffS-2
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Trouble using single and double quotes in wpv-conditional
Started by: jeffS-2
in: Toolset Professional Support
Problem: I am trying to use wpv-conditional to test for an empty value in an email custom field. If I include another shortcode inside the wpv-conditional, it does not work as expected. Solution: Add the following line to your wp-config.php file to disable the PCRE regex engine: ini_set('pcre.jit', false); |
|
2 | 6 | 6 years, 2 months ago | |
How to get field value in CPT using PHP?
Started by: jeffS-2
in: Toolset Professional Support
Problem: In a single "member's profile" post, there is a custom date field "expire-date", which is created with Types plugin, you are going to get the "Year" value from "expire-date" field. Solution: You can try get the timestamp value of "expire-date" field with function get_post_meta(), for example: $expire_date_timestamp = get_post_meta(get_the_ID(), 'wpcf-expire-date', true); Then you can get the year value by timestamp using PHP function date, like this: $expire_date_year = date('Y', $expire_date_timestamp); Relevant Documentation: http://php.net/manual/en/function.date.php https://developer.wordpress.org/reference/functions/get_post_meta/ |
|
2 | 4 | 6 years, 2 months ago | |
Better to use “eq” or “==” ? And better to use “empty()” or “eq (empty str)” ?
Started by: jeffS-2
in: Toolset Professional Support
Problem: Using [wpv-conditional] shortcode, I am curious if it is better (or matters) to use eq/neq or use ==/!= ? Also, is there a difference between using empty($wpcf-field-name) or using $wpcf-field-name eq "" ? Solution: I suggest you use eq/ne in your [wpv-conditional] shortcodes. Using empty($wpcf-field-name) or using $wpcf-field-name eq "" are same result, you can use one of them. Relevant Documentation: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-conditional |
|
2 | 4 | 6 years, 2 months ago | |
How to update Types default value for custom field programatically?
Started by: jeffS-2
in: Toolset Professional Support
Problem: I have a CPT called Member_Profile with a field called "expiration-date" which defaults to the following year when a new member signs up, since membership is good for one year. All memberships expire on 31-Dec-yyyy. This field hold only yyyy. I have to update this field manually in the Types Post Field Group every December. I am trying to write a PHP function or filter to do this automatically but not sure how to do it. Solution: Yes, it needs custom codes, for example, you can try the filter hook "wpt_field_options", like this: Relevant Documentation: |
|
2 | 5 | 6 years, 2 months ago | |
How to update a specific field, such as expiration-date, for multiple members?
Started by: jeffS-2 in: Toolset Professional Support |
|
2 | 5 | 6 years, 2 months ago | |
Switching to PHP 703 causes wpv-if to not be recognized?
Started by: jeffS-2
in: Toolset Professional Support
Problem: Test a local instance of a site for PHP 7 compatibility, but there are a bunch of [wpv-if] shortcodes displayed. Solution: You can replace all [wpv-if] shortcodes with [wpv-conditional] shortcodes, and test again. Relevant Documentation: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-conditional |
|
2 | 3 | 6 years, 2 months ago | |
Which hook to use to create new user from CRED form?
Started by: jeffS-2 in: Toolset Professional Support |
2 | 3 | 6 years, 4 months ago |