繁体   English   中英

使用WordPress时工具提示工具提示内容为空

[英]Tooltipster tooltip contents empty when using WordPress

在我们的WordPress网站上实施Tooltipster,但遇到了障碍。 工具提示正确打开,但是工具提示中的内容为空。 此代码在WordPress之外有效。 请帮忙?

这是所有设置的方式。

1)在functions.php中:

wp_enqueue_style( 'ttcss', '/ours/tt/dist/css/tooltipster.bundle.min.css' );
wp_enqueue_style( 'ttcss-noir', '/ours/tt/dist/css/plugins/tooltipster/sideTip/themes/tooltipster-sideTip-noir.min.css' );
wp_enqueue_script( 'ttjs', '/ours/tt/dist/js/tooltipster.bundle.min.js', array('jquery'), null, true );

2)在关闭</head>前,在header.php中:

<script> jQuery(document).ready(function() { 
            jQuery('.ourtip').tooltipster({
                    theme: 'tooltipster-noir',
                    contentCloing: true,
                    contentAsHTML: true
            }); 
    }); 
    </script>

3)在主题内,需要工具提示的位置:

<span class="ourtip" data-tooltip-content="#ourtip_content">Tool</span>

4)在主题下方,应显示(但不应该显示):

<?php
function ours_publisher_popup() 
{
?>
<style>.ourtip_templates {display: none;} </style>
<div class="ourtip_templates">
    <div id="ourtip_content">
        <strong>This text should display but is missing.<br></strong>
    </div>
</div>
<?php
}
ours_publisher_popup(); ?>

最终成为一个有冲突的插件。 一次禁用WP插件,直到它开始工作,然后才发现一个也在尝试使用Tooltipster的插件。 停用该功能并返回功能。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM