分享

去除wordpress功能下面的文章 RSS、评论 RSS、WordPress.org

 Python进阶者 2023-02-10 发布于广东

前面已经写了“利用七牛云存储CDN服务给WordPress静态文件加速”,我推荐使用我爱水煮鱼的 七牛镜像存储 WordPress 插件 ,需要先安装 WPJAM, 其实顺序无所谓先安装第一个也会提示安装另一个。如果安装 WPJAM 过程提示没有标题之类的错误不用管不会影响使用的。

安装完之后打开七牛云存储:

填入cdn的网址 空间名填写在七牛创建的空间名, AccessKey/SecretKey 在七牛的网页上 个人面板——密钥管理中可以找到然后保存更改就可以了。

下面介绍去除wordpress功能下面的文章 RSS、评论 RSS、WordPress.org方法,用记事本打开\wp-includes\widgets\class-wp-widget-meta.php

1、删除功能下面的WordPress.org

找到如下文本:

  1. /**

  2. * Filters the "Powered by WordPress" text in the Meta widget.

  3. *

  4. * @since 3.6.0

  5. *

  6. * @param string $title_text Default title text for the WordPress.org link.

  7. */

  8. echo apply_filters( 'widget_meta_poweredby', sprintf( '<li><a title="%s">%s</a></li>',

  9. esc_url( __( 'https:///' ) ),

  10. esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ),

  11. _x( 'WordPress.org', 'meta widget link text' )

  12. ) );

修改为(或直接删除):

  1. /**

  2. * Filters the "Powered by WordPress" text in the Meta widget.

  3. *

  4. * @since 3.6.0

  5. *

  6. * @param string $title_text Default title text for the WordPress.org link.

  7. echo apply_filters( 'widget_meta_poweredby', sprintf( '<li><a href="%s" title="%s">%s</a></li>',

  8. esc_url( __( 'https:///' ) ),

  9. esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ),

  10. _x( 'WordPress.org', 'meta widget link text' )

  11. ) );

  12. */

功能下面的 WordPress.org 就可以去掉了。

2、删除功能下面的 文章 RSS

直接注释或删除下面的代码就可以了

  1. <li>

  2.    <a href="<?php echo esc_url( get_bloginfo( 'rss2_url' ) ); ?>">

  3.        <?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?>

  4.    </a>

  5. </li>

3、删除功能下面的 评论 RSS

直接注释或删除下面的代码就可以了

  1. <li>

  2.    <a href="<?php echo esc_url( get_bloginfo( 'comments_rss2_url' ) ); ?>">

  3.        <?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?>

  4.    </a>

  5. </li>

    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多