This file contains 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="ja"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> | |
<title>ユーザーエージェントで機種を識別する</title> | |
</head> | |
<body> | |
<?php | |
$agent = $_SERVER['HTTP_USER_AGENT']; |
This file contains 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 | |
//////////////////////////////////////////////// | |
//カスタム投稿タイプ「物件」の設定 | |
//////////////////////////////////////////////// | |
function add_realestate_type(){ | |
//カスタム投稿タイプ(物件)の設定 | |
$args = array( | |
'label' => '物件0', | |
'labels' => array( | |
'singular_name' => '物件1', |
This file contains 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 | |
$hex_str = "cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffffff0000ff222222cc0000333333ffff |
This file contains 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
//jedit Xの正規表現構文(ruby)にて動作確認。 | |
(?<=.).* |
This file contains 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
//meta_idはnullにすると適したidを振ってくれる。 | |
//特殊記号-+'`&等は、インポートの際、ひっかかるので、削除しておくこと | |
INSERT INTO `wp_postmeta` (meta_id, post_id, meta_key, meta_value) | |
VALUES (null,記事ID,'カスタムフィールド名','値'), | |
(null,記事ID,'カスタムフィールド名','値'), | |
(null,記事ID,'カスタムフィールド名','値'); |
This file contains 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
//該当部分だけのコードです。ソースを見て、必要な箇所だけコピペで差し替えてください。 | |
//奇数、偶数を自動追加 | |
stripe: function(options) { | |
var c = jQuery.extend({ | |
oddClass:'odd', | |
evenClass:'even', | |
rowoddClass:'rowodd', | |
rowevenClass:'roweven' | |
}, options); |
This file contains 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 | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
$args = array( | |
'post_type' => 'ポストタイプを記述', | |
'posts_per_page' => 10, //表示件数 | |
'paged' => $paged, //現在何ページ目かを取得 | |
'tax_query' => array( //カスタム分類を複数選択 | |
'relation' => 'AND', //ANDまたはOR | |
array( | |
'taxonomy' => 'タクソノミ名を記述', |
This file contains 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> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>テスト</title> | |
</head> | |
<body> | |
<?php | |
$url = "http://b.hatena.ne.jp/hotentry.rss"; | |
$str = file_get_contents( $url ); |
This file contains 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
/////////////////////////////////////// | |
//functions.phpに以下を記述 | |
/////////////////////////////////////// | |
function pagination($pages = '', $range = 2){ | |
$showitems = ($range * 2)+1; | |
global $paged; | |
if(empty($paged)) $paged = 1; | |
if($pages == ''){ | |
global $wp_query; | |
$pages = $wp_query->max_num_pages; |
This file contains 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="ja"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> | |
<title>2つのキーワードをランダムに組み合わせる</title> | |
</head> | |
<body> | |
<h1>2つのキーワードをランダムに組み合わせる</h1> | |
<hr /> |
OlderNewer