Skip to content

Instantly share code, notes, and snippets.

@kdice-k

kdice-k/functions.php

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