
Secara baku, WordPress tidak mengeksekusi shortcodes dalam text widget atau excerpts serta category dan tag description.
Untuk memasukkan shortcodes ke dalam text widget atau excerpts serta category dan tag description, maka Sampeyan perlu menambahkan beberapa baris script ke dalam functions.php:
//Aktifkan shortcodes di WordPress Excerpts, Text Widgets, Category Description dan Tag Description
add_filter( 'the_excerpt', 'do_shortcode' );
add_filter( 'widget_text', 'do_shortcode' );
add_filter( 'term_description', 'do_shortcode' );
add_filter( 'category_description', 'do_shortcode' );
add_filter( 'post_tag_description', 'do_shortcode' );
add_filter( 'term_description', 'shortcode_unautop' );
remove_filter( 'pre_term_description', 'wp_filter_kses' );
Pastikan bahwa Sampeyan menggunakan child-theme untuk menambahkan script ini. Jika tidak, script Sampeyan akan dihapus ketika Sampeyan mengupdate theme.