【问题标题】:How to get rid from RSS and Wordpress.org fields in Wordpress side?如何摆脱 Wordpress 端的 RSS 和 Wordpress.org 字段?
【发布时间】:2018-01-06 09:08:29
【问题描述】:

我使用了从以下网站下载的 Wordpress 运动主题:

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

Wordpress 版本是 4.8

此主题在页脚中有 RSS 和 Wordpress.org 字段。

如何摆脱上面提到的那些领域?

我的意思是,需要更改哪些文件才能使这些字段不可见 在页脚?

谢谢。

//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>

【问题讨论】:

    标签: php wordpress wordpress-theming


    【解决方案1】:

    在主题中需要删除使用 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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-08-31
      • 1970-01-01
      • 1970-01-01
      • 2011-06-24
      • 1970-01-01
      • 2017-04-10
      • 1970-01-01
      • 2023-03-24
      相关资源
      最近更新 更多