{"id":5045,"date":"2022-08-11T13:20:46","date_gmt":"2022-08-11T13:20:46","guid":{"rendered":"https:\/\/www.portotheme.com\/wordpress\/porto\/shortcodes\/?page_id=5045"},"modified":"2022-08-17T12:56:08","modified_gmt":"2022-08-17T12:56:08","slug":"conditional-rendering","status":"publish","type":"page","link":"https:\/\/www.portotheme.com\/wordpress\/porto\/shortcodes\/shortcodes\/conditional-rendering\/","title":{"rendered":"Conditional Rendering"},"content":{"rendered":"
[vc_row][vc_column width=”5\/6″ offset=”vc_col-sm-offset-1″ conditional_render=”%5B%7B%22value_role%22%3A%22customer%22%7D%5D” css=”.vc_custom_1660601711509{margin-top: 60px !important;margin-bottom: 12px !important;}” el_class=”pb-md-5 pb-0″][vc_custom_heading text=”Conditional Rendering” font_container=”tag:h2|font_size:30px|text_align:center” use_theme_fonts=”yes” el_class=”m-b-md”][vc_separator color=”custom” border_width=”3″ el_width=”10″ type=”small” accent_color=”#0088cc”][vc_custom_heading text=”With this feature, you can show or hide section(column) when it meets specific conditions. By Device Type, Login Status, User Role and combination of these three status you can determine whether the section(column) should be rendered on page or not. As a result, DOM<\/b> nodes and TTFB<\/b> will be reduced.” font_container=”tag:p|font_size:16.8px|text_align:center|color:%23777777|line_height:26px” use_theme_fonts=”yes”][\/vc_column][vc_column conditional_render=”%5B%7B%22condition_a%22%3A%22device%22%2C%22comparative_operator%22%3A%22not_equal%22%2C%22value_device%22%3A%22tablet_mobile%22%2C%22value_role%22%3A%22customer%22%7D%5D” el_class=”mb-md-5 mb-0″]