Hi,
I am rendering icons based on whether site admin has ticked a series of boxes - it's a custom field of Checkboxes.
I have successfully rendered these on a custom post type created by Toolset (available experiences) using the types shortcodes:
<div class="row">
<div class="vc_col-sm-12 icon-payment-types-container">
[types field='payment-options' state="checked" option="0"]
hidden link">
<img id="chsp" src="hidden link" onmouseover="changeText('Commonwealth Home Support Program', '5px')" onmouseout="defaultText()" />
[/types]
[types field='payment-options' state="checked" option="1"]
hidden link">
<img id="ndis" src="hidden link" onmouseover="changeText('National Disability Insurance Scheme', '65px')" onmouseout="defaultText()" />
[/types]
[types field='payment-options' state="checked" option="2"]
<img id="dva" src="hidden link" onmouseover="changeText('Eligible DVA Card', '125px')" onmouseout="defaultText()"/>
[/types]
[types field='payment-options' state="checked" option="3"]
<img id="ph" src="hidden link" onmouseover="changeText('Private Health Refund Available', '185px')" onmouseout="defaultText()"/>
[/types]
[types field='payment-options' state="checked" option="4"]<img id="hcp" src="hidden link" onmouseover="changeText('Home Care Package', '245px')" onmouseout="defaultText()" />[/types]
[types field='payment-options' state="checked" option="5"]<img id="cf" src="hidden link" onmouseover="changeText('Customer Funded (Private Payment)', '305px')" onmouseout="defaultText()" />[/types]
[types field='payment-options' state="checked" option="6"]<img src="hidden link" onmouseover="changeText('Medicare Bulk Billing Available', '365px')" onmouseout="defaultText()" />[/types]
</div>
</div>
The issue is that the client want to render these on regular pages as well, so I need to add this logic to a new template I am creating - page-costicons.php. What is the php equivalent to the types conditional shortcode , something like:
IF (payment-options option 5 is checked ){
render image
}