I want to make dynamic short code so insert php code of metabox text value to short code.
I wrote this:
<?php echo do_shortcode("[svg-flag flag=\"".get_post_meta($post->ID, 'ozellikler_text', true);".\"]"); ?>
Parse error: syntax error, unexpected ';', expecting ',' or ')' in /home/deniztas/themeforest-deneme2.deniz-tasarim.site/wp-content/themes/html5blank-stable/my_homepages/right.php on line 14
I explain what I want step by step:
There is a short code which shows country flags.
For example, this code shows Turkey (tr) flag.
I want to change the
"tr"to dynamic metabox text value:
<?php echo get_post_meta($post->ID, 'ozellikler_text', true) ?>
How can I do it? What is true syntax or simpler way than mine?
I ask this here instead of stackoverflow because I think maybe it needs wordpress info.Thanks