如何更改wordpress中的页脚内容

时间:2015-12-10 13:25:31

标签: php wordpress footer

我希望我的输出是: - copyright @ shravansoft2015 目前它显示我作为copyrightsshravansoft2015 我的页脚代码如下

footer.php

<?php

/**
 * Footer.php outputs the code for your footer widgets, contains your footer hook and closing body/html tags
 * @package Tetris WordPress Theme
 * @since 1.0
 * @author AJ Clarke : http://wpexplorer.com
 * @copyright Copyright (c) 2012, AJ Clarke
 * @link http://wpexplorer.com
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 */
?>
<div class="clear">`enter code here`</div><!-- /clear any floats -->    
</div><!-- /main-content -->

    <div id="footer-wrap">

        <footer id="footer">

            <div id="footer-widgets" class="clearfix">

                <div class="footer-box">

                    <?php dynamic_sidebar('footer-one'); ?>

                </div><!-- /footer-box -->

                <div class="footer-box">

                    <?php dynamic_sidebar('footer-two'); ?>

                </div><!-- /footer-box -->

                <div class="footer-box remove-margin">

                    <?php dynamic_sidebar('footer-three'); ?>
                </div><!-- /footer-box -->

            </div><!-- /footer-widgets -->
        </footer><!-- /footer -->

    </div><!-- /footer-wrap -->

    <?php if ( get_theme_mod( 'wpex_copyright', '1' ) ) { ?>

        <div id="copyright">

            <?php echo get_theme_mod('wpex_copyright', 'Powered by 

<a href=\"http://www.wordpress.org\" title="WordPress" 

target="_blank">WordPress</a> and <a 

href=\"http://themeforest.net/user/WPExplorer?ref=WPExplorer" target="_blank" 

title="WPExplorer" rel="nofollow">WPExplorer Themes</a>') ?>
        </div>

    <?php } ?>

</div><!-- /wrap -->

<?php wp_footer(); // Footer hook, do not delete, ever ?>

</body>

</html>

1 个答案:

答案 0 :(得分:0)

看看这一行:<?php if ( get_theme_mod( 'wpex_copyright', '1' ) ) { ?>

此区域由您的主题控制。要更改此设置,您需要访问 Wordpress信息中心,然后选择外观>自定义。从定制器菜单中,选择“主题设置”。

  

我希望我的输出为:-copyright @ shravansoft2015目前将其显示为copyrightsshravansoft2015

我不确定为什么要删除@符号。如果将<p>copyright@shravansoft2015</p>添加到“自定义版权”区域,则可以正常使用。

customizer screenshot