Shortcode error
-
Hi!
I’m trying to add some blocks via shortcodes.First, I’ve added to category description (all is OK):
add_filter( 'term_description', 'filter_function_name_386', 10, 4 ); function filter_function_name_386( $value, $term_id, $taxonomy, $context ){ // filter... return $value .= do_shortcode( '[the_ad id="1681"]' ); }
After that I tried to do the same for tags, but it fails:
add_filter( 'post_tag_description', 'filter_function_name_385', 10, 4 ); function filter_function_name_385( $value){ // filter... //shortcode returns an empty string here $aaa = do_shortcode( '[the_ad id="1681"]'); return $value. $aaa . 'ttt'; }
So do_shortcode returns an empty string here, how can I fix it? Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Shortcode error’ is closed to new replies.