Shortcodes Not Working – WordPress version 6.0
-
IN all past WordPress versions, before version 6.0, my custom shortcode to draw and display categories and number of entries worked.
Then WordPress version 6.0 changed all that.
I created 7 shortcodes to display different categories in a sitemap category page and entered the PHP into the functions.php file of the child-theme.
The problem, is only one of 7 shortcodes will work (display results) on the page while the other shortcodes won’t. The moment I remove the one that does display, the next one after it will display and the rest won’t.
Plugins tested – made no difference
Theme changed to default WordPress theme – made no difference
Used in a basic test page – problem still occurs
Installed WordPress version 5.9.3, – problem solved and all shortcodes displayed results on the page.My Shortcode syntax (Note: names for each shortcode are different)
add_shortcode( 'pp_cat_list_date', 'my_list_categories_shortcode_date' ); //Use short-code: [pp_cat_list_date][/pp_cat_list_date] function my_list_categories_shortcode_date() { $args = array( //Date ID = 5 'exclude' => '1,3,7,21,277,365', 'show_count' => 'true' ); return wp_list_categories( $args ); }
Request:
Since this problem is caused by WordPress 6.0 and not anything else, what has changed in WordPress 6.0 that causes this display issue and how can I fix it?
- The topic ‘Shortcodes Not Working – WordPress version 6.0’ is closed to new replies.