wordpress-theme-puock
wordpress-theme-puock copied to clipboard
文章内翻页时,latex会失效
- 主题版本号:2.5.3
- WordPress版本:5.8.4
- 问题阐述:
如题,在文章中加入
<!--nextpage-->
后,点击文章右下角的页面按钮翻页后,latex失效。 经过分析后发现,如果给翻页按钮的标签加上target="_self" rel="noopener"
,就可以解决问题。 由于我不会php,所以我的解决方法是在single.php 51行处定义的link_pages后面加上 $link_pages = str_replace("class="post-page-numbers"", "class="post-page-numbers" target="_self" rel="noopener"", $link_pages);
- 主题版本号:2.5.3
- WordPress版本:5.8.4
- 问题阐述: 如题,在文章中加入
<!--nextpage-->
后,点击文章右下角的页面按钮翻页后,latex失效。 经过分析后发现,如果给翻页按钮的标签加上target="_self" rel="noopener"
,就可以解决问题。 由于我不会php,所以我的解决方法是在single.php 51行处定义的link_pages后面加上 $link_pages = str_replace("class="post-page-numbers"", "class="post-page-numbers" target="_self" rel="noopener"", $link_pages);
我的不存在问题,我没用主题的latex功能,将latex写死了,参考: http://docs.mathjax.org/en/latest/web/configuration.html ,主题的 header.php 添加:
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
},
svg: {
fontCache: 'global'
}
};
</script>
<script type="text/javascript" id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js">
</script>
如果是开启了无刷新加载则会有这个问题,建议使用公式这些关闭无刷新加载