PHP in shortcode doesn’t display on widgets
-
Hi,
The shortcode containing PHP works on pages/posts but when I write
[category-name]
in a text widget or in a Custom HTML widget, it displays nothing, since version 3.0.2If I do the same with a shortcode containing HTML (no php), it works fine though.
I am sure my php code is valid because it used to work.
Here it is:$current_cat_id = the_category_ID(false); echo '<span>' . get_cat_name($current_cat_id) . '</span>';“Shrotcode” and “PHP code” are ticked.
I hope you can help,
Thanks in advance,
FranThe page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘PHP in shortcode doesn’t display on widgets’ is closed to new replies.