This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$data['url'] = get_bloginfo('url'); | |
$data['temp_url'] = get_bloginfo('template_directory'); | |
if($post->post_type == 'knowhow'){ | |
$tax_type = current( get_the_terms( $post->ID, 'type' ) ); | |
$tax = esc_attr($tax_type->slug); | |
if($tax == 'type_shiminuki'){ | |
echo '<a href="' . $data['url'] . '/type/type_shiminuki"><img src="' . $data['temp_url'] . '/img/blog/cat_shiminuki.jpg" /></a>'; | |
}elseif($tax == 'type_bag'){ | |
echo '<a href="' . $data['url'] . '/type/type_bag"><img src="' . $data['temp_url'] . '/img/blog/cat_bag.jpg" /></a>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//→ あの日見た WordPress API の機能を僕達はまだ知らない » 新潟グラム http://dogmap.jp/niigm4/#slide-41 | |
function browser_body_class($classes) { | |
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone; | |
if($is_lynx) $classes[] = 'lynx'; | |
elseif($is_gecko) $classes[] = 'gecko'; | |
elseif($is_opera) $classes[] = 'opera'; | |
elseif($is_NS4) $classes[] = 'ns4'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//【$dataの中身】 | |
> 文章文章文章文章文章文章文章文章文章文章文章文章文章文 | |
回答回答回答回答回答回答回答。 | |
> 文章文章文章文章文章文章文章文章文章文章文章文章文章文 | |
> 文章文章文章文章文章文章文章文章文章文章文章文章文章文 | |
回答回答回答回答回答回答回答。 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//via. http://www.arielworks.net/articles/2003/1220a | |
//------------------------------------------------------------------------- | |
// array get_http_header( string URI ) | |
// URIがHTTPプロトコルだった場合、そのURIにHEADリクエストを行います。 | |
// 返り値にはHTTP-Version、Status-Code、Reason-Phraseが必ず含まれ、それ以外 | |
// にサーバが返した情報(index: value)が含まれます。 | |
// Status-Codeが9xxの場合、それはホストが存在しない場合などHTTPリクエストが | |
// 正常に行われなかったことを意味します。 | |
//------------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
【html】 | |
<ul class="hoge"> | |
<li><img src="img/base.png" id="0001" /></li> | |
<li><img src="img/base.png" id="0002" /></li> | |
<li><img src="img/base.png" id="0003" /></li> | |
</ul> | |
【jQuery】 | |
<script type="text/javascript"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<!-- | |
ancora theme | |
made by amy (arreter) | |
don't remove credits | |
--> | |
<meta name="color:text" content="#222"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?> | |
タイトル:<?php the_title(); ?> | |
日付:<?php the_time('Y.m.d'); ?> | |
<?php the_content('',FALSE,''); ?> | |
<?php endwhile; else: ?> | |
<h2>記事がありませんでした</h2> | |
<p>申し訳ありません。ご覧のページは存在しないか、URLが変更された可能性があります。</p> | |
<?php endif; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); //gulp本体 | |
var imagemin = require('gulp-imagemin'); //画像軽量化 | |
var imagemin_png = require('imagemin-pngquant'); //画像軽量化 | |
var plumber = require('gulp-plumber'); //watch対応 | |
var webserver = require('gulp-webserver'); //live reload | |
var sass = require('gulp-ruby-sass'); //scss -> css | |
//htmlをコピー | |
gulp.task('html', function() { | |
gulp.src('./src/*.html') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "projectName", | |
"version": "1.0.0", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", | |
"devDependencies": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" シンタックスON | |
syntax on | |
" カーソル行にライン | |
set cursorline | |
" 対応括弧に<>を追加 | |
set matchpairs& matchpairs+=<:> | |
" 対応括弧をハイライト表示する | |
set showmatch | |
" ウィンドウの幅より長い行は折り返され、次の行に続けて表示される | |
set wrap |