Problem: I need to add a script tag to my Custom Template. In the script tag's src attribute, I would like to append a URL variable and value coming from a custom field, but I cannot get the Types numeric field shortcode to work correctly. The shortcode is written out in the src URL instead of being executed. I need to add the custom field's numeric value in a URL parameter attached to the src URL.
Solution: It turns out that WordPress does not execute shortcodes in script tags URL parameters, whether or not Toolset is involved.Thi p The same problem can be seen even if custom shortcodes are use i . The solution in this case is to get the value of the custom field using the types_render_field API, then append that value to the src attribute URL using a custom shortcode.
I want to update the array by using custom code written in toolset custom code section. The code has been written and it works fine if I use the on-demand feature of toolset and append the file
Problem:
A view's taxonomy filter does not display some terms until the user adds more than one post to the term.
Solution:
The view displays the media files, which do not have the status set to publish. In that case, Toolset will search for their parent post status. And the status should be "publish" or "private".
The terms that the user talks about were including only one post, and that post did not have the status "publish" or "private" and it did not have a parent post either.
The media files need to be attached to a post, or the view needs to query media files in all statuses.
Problem: I have created a Content Template for a custom post type. I am displaying some content inside a custom HTML block. Inside that block, I would like to conditionally display some content if a specific custom field is not empty.
Solution: You can use the wpv-conditional shortcode inside a custom HTML block to add conditional logic for displaying or hiding portions of the content. For example:
[wpv-conditional if="($(wpcf-consignee-company-name) ne '' )"]
<span class="invoice-to-label">Company: [types field='consignee-company-name'][/types]</span><br>
[/wpv-conditional]
The problem here is that the user is creating their custom fields but wanted to convert one field type to another and noticed that some field types cant be converted to another type.
Solution:
This has to do with how the fields are formatted by our plugins in the database. What this means is that some custom fields you won't be able to convert from a simple field to a more complex custom field, example move from a single link to a WYSIWYG field.
Similarly with checkboxes, you won't be able to move from a single line to a checkbox field. Hence why some fields are not allowed to be converted to another field type.