WP No Category Base
で検索
2010年11月19日金曜日
wordpress メモ
Topに新着記事をのせるコード<div id="news">
<h3>新着情報</h3>
<dl>
<?php $myposts = get_posts('numberposts=5&orderby=post_date'); foreach($myposts as $post) : ?>
<dt><?php the_time('Y年n月j日'); ?></dt>
<dd><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></dd>
<?php endforeach; ?>
</dl>
</div>
<h3>新着情報</h3>
<dl>
<?php $myposts = get_posts('numberposts=5&orderby=post_date'); foreach($myposts as $post) : ?>
<dt><?php the_time('Y年n月j日'); ?></dt>
<dd><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></dd>
<?php endforeach; ?>
</dl>
</div>
wordpress メモ
パーマネントリンクでnot foundになった場合
.htaccess 666
AuthUserFile /**************/***/****
AuthGroupFile /dev/null
AuthName Protected Area
AuthType Basic
# BEGIN WordPress
;
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
.htaccess 666
AuthUserFile /**************/***/****
AuthGroupFile /dev/null
AuthName Protected Area
AuthType Basic
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
登録:
投稿 (Atom)