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' );
    

      

  • 相关阅读:
    全区停水,测什么时候来水。
    和电脑打国标麻将,一定要注意
    这是一个可怕的交易
    起一卦,还是这样。什么时候能好起来。
    Linux内核源码真是个好东西
    命宫——天机化忌
    bzoj1024[SCOI2009]生日快乐
    bzoj2561最小生成树
    bzoj2423[HAOI2010]最长公共子序列
    bzoj2705[SDOI2012]Longge的问题
  • 原文地址:https://www.cnblogs.com/ytkah/p/11906206.html
Copyright © 2011-2022 走看看