Category: WordPress

  • how to create a child theme in WordPress

      1. Create a Theme Folder
      2. Create style.css
      3. Add Header Information to style.css
    
    /*
    Theme Name: "name"
    Author: "name"
    Version: 1.0
    Template: name
    */
    

     

    1. Create functions.php (Optional)
    
    <?php //
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    
    }
    
  • WordPress サーバーエラー

    DM配信後、アクセス増の影響かサーバーエラーでアクセスできず。

    解決方法:一旦待つ

    20分くらいで復旧。
    原因不明。

  • 子テーマ作成 WordPress

    1. フォルダ 作成
    2. style.css 作成
    3. functions.php 作成

    1.フォルダ作成
    wp-content → themes → フォルダ作成

    2.style.css
    そのフォルダの中に設置(twentytwenty で作る時)
    /*
    Theme Name : My TwentyTwenty
    Author: 名前
    Version: 1.0
    Template: twentytwenty
    */

    3.functions.php
    そのフォルダの中に設置
    <?php //add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );function theme_enqueue_styles() { wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
    }