php if does not work
-
I tried to use the following code in a widget, but it does not work and it breaks the page.
Precisely, the portfolio tags are correctly displayed, whilst the second part of the code – project url etc. – is not accepted and breaks the page.
Any help will be appreciated.<?php if(get_the_term_list($post->ID, 'portfolio_tags', '', '', '')): ?> <div class="project-info-box"> <h4><?php echo __('Tags', 'Avada') ?>:</h4> <div class="project-terms"> <?php echo get_the_term_list($post->ID, 'portfolio_tags', '', '', ''); ?> </div> </div> <?php endif; ?> <?php if(get_post_meta($post->ID, 'pyre_project_url', true) && get_post_meta($post->ID, 'pyre_project_url_text', true)): $link_target = ''; if ( fusion_get_option( 'portfolio_link_icon_target', 'link_icon_target', $post->ID ) == '1' || fusion_get_option( 'portfolio_link_icon_target', 'link_icon_target', $post->ID ) == 'yes' ) { $link_target = ' target="_blank"'; } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘php if does not work’ is closed to new replies.