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 | |
// サブクエリ | |
// 検索城乾を指定して、投稿を取得できる。 | |
// *************************************************** | |
//現場で使われているWordPressデザインメソッドより P57 | |
// 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
<?php | |
// have_posts 次の投稿が存在すれば、true | |
// http://wpdocs.sourceforge.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/have_posts | |
// the_post() 記事情報の変数設定 | |
// http://wpdocs.sourceforge.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/the_post | |
while (have_posts()) : the_post(): |
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 | |
// カスタム投稿の設定 | |
// 投稿タイプの codex | |
// http://wpdocs.sourceforge.jp/%E6%8A%95%E7%A8%BF%E3%82%BF%E3%82%A4%E3%83%97 | |
// register_post_type codex | |
// http://wpdocs.sourceforge.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/register_post_type | |
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
// Advanced Custom Fields の使い方がある。 | |
// http://www.advancedcustomfields.com/resources/ | |
// 投稿画面で設定した値が、独自のテンプレート関数やショートコードで参照できる。 | |
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
<!-- JavaScript のイベントについて | |
********************************* | |
基礎 Ajax + JavaScript | |
P204 | |
--> | |
<input type="button" value="Click me!" onClick"alert('hello')"> | |
<!-- イベントのデフォルト動作を止める --> | |
<!-- イベントの中で、return false を指定すると動きをやめることができる。 --> |
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
<!--*************************** | |
DOM EVENTS | |
基礎 Ajax + JavaScript | |
P253 | |
DOMのイベントは、Eventオブジェクトのこと。 | |
Eventオブジェクトで取得できる内容はいかにまとめられている。 | |
https://developer.mozilla.org/ja/docs/Web/API/Event |
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
<!-- | |
基礎Ajax + JavaScript | |
P256-P257 | |
onclike = name でイベントハンドラを設定できるが、 | |
DOMのaddEventListenerメソッドでも設定できる。 | |
addEventListenerメソッドの利点 | |
・DOM標準仕様でイベントハンドらを設定できる。 |
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
<p>2006年10月14日</p> | |
<p>アップルコンピュータは、13日アメリカ合衆国で、また14日日本で、赤いiPod nanoを発売した。売り上げの一部がアフリカのエイズ対策に使われる。</p> | |
<p>インプレスによれば、この商品は、iPod nano (PRODUCT) RED Special Editionと呼ばれる製品で、従来のiPod nanoの本体を赤くしたものである。容量は4ギガバイトで、価格は従来相当品と同等である。</p> | |
<p>CNNによると、U2のボノ氏が13日 (UTC-5) シカゴで販売店を回り、商品を手に取って見せるなどして紹介した。東京都中央区銀座のアップルストアでは14日、午前10時 (UTC+9) の開店と同時に発売した。</p> | |
<p>CNETによれば、この製品は、ボノ氏とボビー・シュライヴァー氏が立ち上げた「(Red) プロジェクト」[1][2]に参画する商品で、売り上げの内、1台あたり10ドルが、世界エイズ・結核・マラリア対策基金に寄付されるとされている。</p> |
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
require 'spreadsheet' | |
require 'json' | |
Spreadsheet.client_encoding = 'UTF-8' | |
begin | |
book = Spreadsheet.open $*[0] | |
rescue | |
STDERR.puts "usage: ruby x2j.rb excel_file" | |
exit false |
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
/**************************************************************************** | |
指定したキーワードで、Youtube動画を検索して、もっとも近い動画を再生したい。 | |
動画の再生は、サイト内で行いたい。 | |
デモサイトはこちら | |
http://ticklecode.com/present/150206_wp_moku_YouTube_API/ | |
******************************************************************************/ | |
OlderNewer