zoukankan      html  css  js  c++  java
  • 禁用wordpress模板默认样式

      我们知道wordpress主题比如twentytwenty都会有样式,如果不想使用它们的默认样式怎么处理呢?其实很简单,随ytkah一起来看看吧。进入2020主题的function.php文件,里面有Register and Enqueue Styles和Register and Enqueue Scripts的函数定义,大概177行左右,将它们注释就可以了

    /**
     * Register and Enqueue Styles.
     */
    //function twentytwenty_register_styles() {
    //
    //	$theme_version = wp_get_theme()->get( 'Version' );
    //
    //	wp_enqueue_style( 'twentytwenty-style', get_stylesheet_uri(), array(), $theme_version );
    //	wp_style_add_data( 'twentytwenty-style', 'rtl', 'replace' );
    //
    //	// Add output of Customizer settings as inline style.
    //	wp_add_inline_style( 'twentytwenty-style', twentytwenty_get_customizer_css( 'front-end' ) );
    //
    //	// Add print CSS.
    //	wp_enqueue_style( 'twentytwenty-print-style', get_template_directory_uri() . '/print.css', null, $theme_version, 'print' );
    //
    //}
    
    //add_action( 'wp_enqueue_scripts', 'twentytwenty_register_styles' );
    
    /**
     * Register and Enqueue Scripts.
     */
    //function twentytwenty_register_scripts() {
    //
    //	$theme_version = wp_get_theme()->get( 'Version' );
    //
    //	if ( ( ! is_admin() ) && is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    //		wp_enqueue_script( 'comment-reply' );
    //	}
    //
    //	wp_enqueue_script( 'twentytwenty-js', get_template_directory_uri() . '/assets/js/index.js', array(), $theme_version, false );
    //	wp_script_add_data( 'twentytwenty-js', 'async', true );
    //
    //}
    //
    //add_action( 'wp_enqueue_scripts', 'twentytwenty_register_scripts' );
    

      

  • 相关阅读:
    解读tensorflow之rnn 的示例 ptb_word_lm.py
    tensorflow 的rnn的示例 ptb_word_lm.py 的完整代码
    python中decorator的用法及原理(一)
    android 6 (API 23) 及更高版本 面向 NDK 开发者的 Android 变更
    GCC选项_-Wl,-soname 及 DT_NEEDED 的解释
    一万小时天才理论
    好好说话!
    如何打造你的独立观点
    整理的艺术3
    读过的书记不住怎么办?
  • 原文地址:https://www.cnblogs.com/ytkah/p/11906206.html
Copyright © 2011-2022 走看看