Skip to content

Instantly share code, notes, and snippets.

Last active March 15, 2022 10:12
What would you like to do?
WordPress テーマ自作 メニュー機能を有効にする
function custom_theme_setup() {
add_theme_support( 'menus' );
add_action( 'after_setup_theme', 'custom_theme_setup' );
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php wp_head(); ?>
<h1>テーマ機能 追加のテスト</h1>
<?php wp_nav_menu(['menu' => 'main_nav']); ?>
<?php wp_footer(); ?>
@charset "utf-8";
Theme Name: ざっくりテスト用
Theme URI:
Description: シンプルテーマを作るテスト環境用
Version: 0.01
Author: D4isk
Author URI:
h1 {
font-size: 24px;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment