WordPressLeaf主题设置:如何替换掉文章中的“捐赠本站”信息?

导语:有部分网友在问怎样才能替换掉文章中的“捐赠本站”信息,其实这个很简单的,就是替换一下图片,改一下文字。但考虑到很多网友只是使用者,并不是开发者,所以还是写一个具体的操作指南。可能以前考虑得太简单了,以为大家都是开发者类型,对什么HTML/CSS熟得不得了,其实有很多网友是具体的内容贡献者,不一定会对代码熟悉,抱歉。

捐赠本站的三个部分

文章中,在上下文链接的下面有一个“捐助本站”的信息框,这个信息框由三部分构成:

  1. 左侧的微信支付图片
  2. 右上侧的标题和社交关注按钮
  3. 右下侧的文字信息

如下图所示:

WordPressLeaf主题设置:如何替换掉文章中的“捐赠本站”信息?
捐赠本站

如何修改

如果要将“捐赠本站”的信息修改成自己的,那么也分为三个部分。

替换你的微信支付图片

你可以把默认的微信支付图片替换成自己的公众号二维码,自己的个人头像,或者像我们一样的微信支付(支付宝支付)的二维码图片。

图片的名字叫weixin.png,做图片位置在下面的目录内:

http://yoursite/wp-content/themes/yourthemename/assets/images/weixin.png

yoursite是指你的网站域名。yourthemename是指你所使用的WordPressLeaf主题的目录名称,或许你改成了其他的名称,没有使用默认的目录名。

你将你的图片也命名为weixin.png,上传到上面的目录覆盖原有的就可以了。覆盖完了,记得刷新你的浏览器缓存,这样做之后,你看到的图片就是你自己的图片了。

增加你的社交关注按钮

其实这个早在WordPressLeaf主题如何设置社交关注按钮内有过详细的说明,请前往这篇文章阅读一下,重点关注的内容是:

如果勾选了“文章关注菜单”,那么会出现在文章中的“捐赠我们”那里。

修改成你的文字信息

其实这个更简单,请打开content-author.php文件,它位于下面的目录:

http://yoursite/wp-content/themes/yourthemename/template-parts/content-author.php

你会看到下面的代码:

 <div class="entry-author-bio">
   <p>如果您觉得这篇文章或者我分享的主题对你有帮助,请支持我继续更新网站和主题 !您可以点击<a rel="nofollow" href="<?php echo esc_url(home_url('/donate') ); ?>">这里</a>捐赠,或者使用微信扫描左边的二维码进行捐赠。</p>
 </div>

将这里面的中文文字修改为你自己想要的文字信息即可。文字中出现的<a rel=”nofollow” href=”<?php echo esc_url(home_url(‘/donate’) ); ?>”>这里</a>,这个a标签你可以直接删除,或将donate修改成自己建好的页面地址。

结束

你学会了吗?如果你有其他的疑问可以加入我们的QQ讨论群489986071,或者直接在网页上留言。


Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

Warning: copy(): Failed to enable crypto in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

Warning: copy(https://www.wordpressleaf.com/wp-content/themes/summerleaf/images/tx/19.png): failed to open stream: operation failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

目前在“WordPressLeaf主题设置:如何替换掉文章中的“捐赠本站”信息?”上有11条评论


  1. Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

    Warning: copy(): Failed to enable crypto in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

    Warning: copy(https://www.wordpressleaf.com/wp-content/themes/summerleaf/images/tx/54.png): failed to open stream: operation failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546
    买否网说道:

    不错不错,很不错。来回访啦


  2. Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

    Warning: copy(): Failed to enable crypto in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

    Warning: copy(https://www.wordpressleaf.com/wp-content/themes/summerleaf/images/tx/78.png): failed to open stream: operation failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546
    大藏说道:

    这么好的开放主题,一定要支持下!网站的服务不错,能像这样详细点就更好了!


    1. Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

      Warning: copy(): Failed to enable crypto in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

      Warning: copy(https://www.wordpressleaf.com/wp-content/themes/summerleaf/images/tx/43.png): failed to open stream: operation failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546
      编辑 杨说道:

      你喜欢就好。


  3. Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

    Warning: copy(): Failed to enable crypto in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

    Warning: copy(https://www.wordpressleaf.com/wp-content/themes/summerleaf/images/tx/58.png): failed to open stream: operation failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546
    米粒博客说道:

    不错的教程,谢谢分享!


    1. Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

      Warning: copy(): Failed to enable crypto in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

      Warning: copy(https://www.wordpressleaf.com/wp-content/themes/summerleaf/images/tx/12.png): failed to open stream: operation failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546
      编辑 杨说道:

      欢迎来访


  4. Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

    Warning: copy(): Failed to enable crypto in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

    Warning: copy(https://www.wordpressleaf.com/wp-content/themes/summerleaf/images/tx/44.png): failed to open stream: operation failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546
    nick说道:

    楼主很用心,学习了。


    1. Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

      Warning: copy(): Failed to enable crypto in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

      Warning: copy(https://www.wordpressleaf.com/wp-content/themes/summerleaf/images/tx/6.png): failed to open stream: operation failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546
      编辑 杨说道:

      你喜欢就好,常来看看。


  5. Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

    Warning: copy(): Failed to enable crypto in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

    Warning: copy(https://www.wordpressleaf.com/wp-content/themes/summerleaf/images/tx/48.png): failed to open stream: operation failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546
    孙超说道:

    这个主题很喜欢, 就是中文标签怎么点了就404页面,英文标签可以, 怎么处理啊、?


    1. Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

      Warning: copy(): Failed to enable crypto in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

      Warning: copy(https://www.wordpressleaf.com/wp-content/themes/summerleaf/images/tx/66.png): failed to open stream: operation failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546
      编辑 杨说道:

      标签无效的,与主题无关,你的wordpress或环境有问题,没有配置好。你看我的都是用的中文标签。


  6. Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

    Warning: copy(): Failed to enable crypto in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

    Warning: copy(https://www.wordpressleaf.com/wp-content/themes/summerleaf/images/tx/16.png): failed to open stream: operation failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546
    说道:

    怎么设置成调用后台作者的信息还有头像


    1. Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

      Warning: copy(): Failed to enable crypto in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

      Warning: copy(https://www.wordpressleaf.com/wp-content/themes/summerleaf/images/tx/97.png): failed to open stream: operation failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546
      编辑 杨说道:

      我写了一篇文章的。你可以找找。

发表评论

邮箱地址不会被公开。 必填项已用*标注