简体   繁体   English

如何摆脱Wordpress方面的RSS和Wordpress.org字段?

[英]How to get rid from RSS and Wordpress.org fields in Wordpress side?

I've used Wordpress sporty theme downloaded from: 我使用了从以下网站下载的Wordpress运动主题:

https://www.templateexpress.com/sporty-theme/ https://www.templateexpress.com/sporty-theme/

Wordpress version is 4.8 WordPress的版本是4.8

This theme has RSS and Wordpress.org fields in the footer. 此主题的页脚中包含RSS和Wordpress.org字段。

How to get rid from those mention above fields? 如何摆脱上面提到的那些领域?

I mean, what files need to be changed in order that those fields want not be visible in the footer? 我的意思是,哪些文件需要更改才能使这些字段在页脚中不可见?

thanks. 谢谢。

//wp_content/themes/sporty/footer.php //wp_content/themes/sporty/footer.php

<?php
/**
 * The template for displaying the footer.
 *
 * Contains the closing of the id=main div and all content after
 *
 * @package sporty
 * @since sporty 1.0
 */
?>

    </div><!-- #main .site-main -->

    <footer id="colophon" class="site-footer" role="contentinfo">

    <div class="section group">

    <div class="col span_1_of_3">
    <?php if ( is_active_sidebar( 'left_column' ) && dynamic_sidebar('left_column') ) : else : ?>
         <div class="widget">
            <?php echo '<h4>' . __('Widget Ready', 'sporty') . '</h4>'; ?>
            <?php echo '<p>' . __('This left column is widget ready! Add one in the admin panel.', 'sporty') . '</p>'; ?>
            </div>     
    <?php endif; ?>  
        </div>

    <div class="col span_1_of_3">
    <?php if ( is_active_sidebar( 'center_column' ) && dynamic_sidebar('center_column') ) : else : ?>
         <div class="widget">
            <?php echo '<h4>' . __('Widget Ready', 'sporty') . '</h4>'; ?>
            <?php echo '<p>' . __('This center column is widget ready! Add one in the admin panel.', 'sporty') . '</p>'; ?>
            </div>     
    <?php endif; ?> 

    </div>

    <div class="col span_1_of_3">
    <?php if ( is_active_sidebar( 'right_column' ) && dynamic_sidebar('right_column') ) : else : ?>
         <div class="widget">
            <?php echo '<h4>' . __('Widget Ready', 'sporty') . '</h4>'; ?>
            <?php echo '<p>' . __('This right column is widget ready! Add one in the admin panel.', 'sporty') . '</p>'; ?>
            </div>     
    <?php endif; ?> 
    </div>
    </div>

         <div class="site-info">
            <a href="<?php $my_theme = wp_get_theme(); echo $my_theme->get( 'ThemeURI' ); ?>">
            <?php _e('Sporty free WordPress Sports Theme','sporty'); ?></a>
            <?php echo __( 'Powered By WordPress ', 'sporty' ); ?>
        </div><!-- .site-info -->
    </footer><!-- #colophon .site-footer -->
    <a href="#top" id="smoothup"></a>
</div><!-- #page .hfeed .site -->
</div><!-- end of wrapper -->
<?php wp_footer(); ?>

</body>
</html>

In the theme need to delete widget that use RSS as below: 在主题中,需要删除使用RSS的小部件,如下所示:

public function widget( $args, $instance ) {
        /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
        $title = apply_filters( 'widget_title', empty($instance['title']) ? __( 'Meta' ) : $instance['title'], $instance, $this->id_base );

        echo $args['before_widget'];
        if ( $title ) {
            echo $args['before_title'] . $title . $args['after_title'];
        }
            ?>
            <ul>
            <?php wp_register(); ?>
            <li><?php wp_loginout(); ?></li>

            //remove RSS

            <?php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM