Skip to content

Instantly share code, notes, and snippets.

View ywnb's full-sized avatar

やわなべ ywnb

View GitHub Profile
<!DOCTYPE html>
<html><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>プロテクトリストメーカー サンプル</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<style type="text/css" media="screen">
label.btn{margin: 0 5px 2px 0;}
th{white-space:nowrap;}
//
// AMP pluginで logo / image情報を追加する
//
add_filter( 'amp_post_template_metadata', 'xyz_amp_modify_json_metadata', 10, 2 );
function xyz_amp_modify_json_metadata( $metadata, $post ) {
$metadata['publisher']['logo'] = array(
'@type' => 'ImageObject',
'url' => "ロゴ画像のURL",
'width' => "ロゴ画像の横幅(px)",
'height' => "ロゴ画像の縦幅(px)",
function gmailCleanUp() {
var delayDays = 365; // Enter # of days before messages are moved to trash
var maxDate = new Date();
maxDate.setDate(maxDate.getDate()-delayDays);
var step = 100;
var start = 0;
var threads = GmailApp.getInboxThreads(start, step);
var deleteCount = 0;
<?php
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles', 10 );
add_filter( 'wpcf7_load_js', '__return_false' );
add_filter( 'wpcf7_load_css', '__return_false' );
?>
/*
Theme Name: ywnb-minimum
Description: Wordpress theme for minimalist
Author: ywnb.net
Template: minimum
Version: 0.0.1
*/
<ul>
<!-- サイト内検索 -->
<li class="widget"><h2 class="widgettitle">サイト内検索</h2>
<?php get_search_form(); ?>
</li>
<!-- カテゴリー -->
<li class="widget"><h2 class="widgettitle">カテゴリー</h2>
<ul><?php wp_list_categories(array('show_count'=>1,'title_li' => '')); ?></ul>
</li>
<div class="archive">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>">
<?php if ( has_post_thumbnail() ): ?>
<div><a href="<?php the_permalink() ?>"><?php the_post_thumbnail('thumb'); ?></a></div>
<?php endif; ?>
<div><span><?php the_category(' / '); ?></span> <span><?php the_time('Y/m/d'); ?></span></div>
<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
<span><?php echo the_excerpt(); ?>...<a href="<?php the_permalink() ?>">[続きを読む]</a></span>
<div class="single">
<?php while ( have_posts() ): the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('group'); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div>
<span class="author">投稿者:<?php the_author(); ?></span>
<span class="category">カテゴリ:<?php the_category(' / '); ?></span>
<span class="tags">タグ:<?php the_tags('', ' / ', ''); ?></span>
<span class="published">公開日:<?php the_time('Y/m/d'); ?></span>
<span class="updated">更新日:<?php the_modified_date('Y/m/d'); ?></span>
<div class="error">
<p>ページが見つかりません</p>
</div>
<!DOCTYPE html>
<html <?php language_attributes();?>>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php wp_title ( '|', true,'right' ); ?><?php bloginfo('name'); ?></title>
<link rel="stylesheet" href="<?php echo get_template_directory_uri();?>/style.css">
<?php wp_head(); ?>
</head>
<body>