【发布时间】:2014-07-01 16:39:43
【问题描述】:
我正在尝试更改朋友 Wordpress 网站上“旧帖子”按钮上的文本...我找到了这个 (https://gist.github.com/jeherve/6177741) --- 我只是不确定将其粘贴到 functions.php 的哪个位置文件。非常感谢任何帮助!
丽兹
【问题讨论】:
标签: wordpress infinite-scroll jetpack
我正在尝试更改朋友 Wordpress 网站上“旧帖子”按钮上的文本...我找到了这个 (https://gist.github.com/jeherve/6177741) --- 我只是不确定将其粘贴到 functions.php 的哪个位置文件。非常感谢任何帮助!
丽兹
【问题讨论】:
标签: wordpress infinite-scroll jetpack
您链接的要点可以放在您的 functions.php 文件中的任何位置。
挂钩到 wp_footer 操作的函数的输出将出现在主题的 get_footer() 位置 - 通常在页面的最后。
阅读更多:
<?php
function jeherve_custom_infinite_more() {
if ( is_home() || is_archive() ) {
?>
<script type="text/javascript">
//<![CDATA[
infiniteScroll.settings.text = "Custom Text";
//]]>
</script>
<?php }
}
add_action( 'wp_footer', 'jeherve_custom_infinite_more', 3 );
【讨论】: