首页 > 解决方案 > 简码在特定插件中不起作用

问题描述

简码不工作图像

短代码:[wpdts-weekday]

函数文件图像

我想从插件(WP 日期和时间简码)添加一个简码:[wpdts-weekday] 到另一个插件(浮动菜单灯),但它不起作用。见图片。

我可以在functions.php中添加一个函数来启用对浮动菜单灯插件的短代码支持,或者在插件文件夹本身中添加一些代码吗?

<?php


/*--------------------------------------------------------------*/
/*                   Theme Functions Here                       */                      
/*--------------------------------------------------------------*/


//---Theme Setup Options - Functions and Hooks
include('includes/theme-setup.php');

//---Adds Shortcodes
include('includes/theme-shortcodes.php');

//---Add Widgets
include('includes/theme-widgets.php');

/*--------------------------------------------------------------*/
/*                   Your Functions Below                       */                      
/*--------------------------------------------------------------*/

add_filter('the_title', 'do_shortcode');
add_filter('widget_title', 'do_shortcode');

?> 

作为旁注,WP Date and Time Shortcode-plugin 可以在网站的其他任何地方使用。

标签: pluginsshortcode

解决方案


推荐阅读