I have fallen into a weird problem, though , I have solved that.
In the following code I have populated post category list and link.
//category name list and link
$x_portfolio_cat_name_link = get_the_term_list( $post->ID, ‘portfolio_cat’, ‘’, ', ’ );
<p class="cat" ><?php echo $x_portfolio_cat_name_link ?></p>
But the Mentor Themeforest shows the following error:
All dynamic data must be correctly escaped for the context where it is rendered. at file layouts/x-portfolio.php, line 97:
<?php echo $x_portfolio_cat_name_link; ?>
So I have used the following two code one after another:
<?php echo esc_url($x_portfolio_cat_name_link) ?>
<?php echo esc_html($x_portfolio_cat_name_link) ?>
Though the error is removed, the category display in the portfolio section shows broken.
Then put the following code i.e., just put brakets. And now everything is OK. Can any bosses explain the fact i.e., why brackets?
<p class="cat" ><?php echo ($x_portfolio_cat_name_link) ?></p>
Thanks for taking the trouble to read.