page.phpを作成
ページの投稿内容を表示させるためpage.phpを下記のように作成
<?php
/**
honyarara
*/
get_header(); ?>
<?php get_sidebar(); ?>
<div id="page-container">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>
</div>
<?php get_footer(); ?>
こうすると、ページの投稿記事ではなく、投稿メニューの新規追加で投稿した記事の内容をとってきました。。
<?php
/**
honyarara
*/
get_header(); ?>
<div id="page-container">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php get_sidebar(); ?>の記述位置を変えたら、ちゃんとページの投稿記事を表示してくれました。
ちょっと詳細はワカラナイです。。
web,direction,planning,graphicdesign
2010年7月12日月曜日
2010年5月18日火曜日
ActionScript ランタイムエラー
TypeError: Error #1009: null のオブジェクト参照のプロパティまたはメソッドにアクセスすることはできません。
とでました。
「表示オブジェクトが表示リストに追加されていない場合、stage プロパティは null に設定されます。」
http://help.adobe.com/ja_JP/AS3LCR/Flash_10.0/flash/display/DisplayObject.html#stage
だそうです。
stage.stageWidth
stage.stageHeight
を数値化しました。
追記
数値化ではなく解消方法
http://www.inazumatv.com/contents/archives/177
完璧に解決でした。すごい。
とでました。
「表示オブジェクトが表示リストに追加されていない場合、stage プロパティは null に設定されます。」
http://help.adobe.com/ja_JP/AS3LCR/Flash_10.0/flash/display/DisplayObject.html#stage
だそうです。
stage.stageWidth
stage.stageHeight
を数値化しました。
追記
数値化ではなく解消方法
http://www.inazumatv.com/contents/archives/177
完璧に解決でした。すごい。
ラベル:
actionscript3.0
2010年2月1日月曜日
Macの不可視ファイルを表示
ターミナルから
defaults write com.apple.finder AppleShowAllFiles TRUE
kill all Finder
を実行
追記
ターミナルをごにょごにょしないでも
Mac上の様々な設定を自由にカスタマイズする事が出来るフリーウェア。
http://www.bresink.com/osx/TinkerTool.html
ダウンロード↓
http://www.bresink.com/osx/0TinkerTool/download.php5
defaults write com.apple.finder AppleShowAllFiles TRUE
kill all Finder
を実行
追記
ターミナルをごにょごにょしないでも
Mac上の様々な設定を自由にカスタマイズする事が出来るフリーウェア。
http://www.bresink.com/osx/TinkerTool.html
ダウンロード↓
http://www.bresink.com/osx/0TinkerTool/download.php5
MacのFinderにファイルパスを表示させる
ターミナルから
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
killall Finder
を実行
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
killall Finder
を実行
2009年12月7日月曜日
tableを交互に色を変える
■ライブラリを使わない場合
要検討
window.onload = function(){
var conf = {
className : 'striped',
childNodeName : 'tr',
oddClassName : 'oddline',
evenClassName : 'evenline'
}
var tables = getElementsByClassName(conf.className);
for(var i=0, len=tables.length; i var table = tables[i];
var lines = table.getElementsByClassName(conf.childNodeName);
for(var j=0, llen=lines.length; j node = lines[j];
if(j%2==0){
node.className = conf.oddClassName;
}else{
node.className = conf.evenClassName;
}
}
}
};
// クラス名によるエレメントノード配列取得
function getElementsByClassName(name){
var elements =[];
var allElements = document.getElementsByTagName('*');
for(var i=0, len=allElements.length; i if(allElements[i].className ==name){
elements.push(allElements[i]);
}
}
return elements;
}
■jQueryを使った場合
//js
$(document).ready(function(){
$("table").each(function(){
jQuery(this).find("tr:odd").addClass("oddline");
});
});
//css
table .oddline{
background:#333;
}
要検討
window.onload = function(){
var conf = {
className : 'striped',
childNodeName : 'tr',
oddClassName : 'oddline',
evenClassName : 'evenline'
}
var tables = getElementsByClassName(conf.className);
for(var i=0, len=tables.length; i
var lines = table.getElementsByClassName(conf.childNodeName);
for(var j=0, llen=lines.length; j
if(j%2==0){
node.className = conf.oddClassName;
}else{
node.className = conf.evenClassName;
}
}
}
};
// クラス名によるエレメントノード配列取得
function getElementsByClassName(name){
var elements =[];
var allElements = document.getElementsByTagName('*');
for(var i=0, len=allElements.length; i
elements.push(allElements[i]);
}
}
return elements;
}
■jQueryを使った場合
//js
$(document).ready(function(){
$("table").each(function(){
jQuery(this).find("tr:odd").addClass("oddline");
});
});
//css
table .oddline{
background:#333;
}
登録:
投稿 (Atom)