クエリーポストまとめURL等

http://blog.sus-happy.net/201105/customfield-search/

meta_key と meta_value
meta_compare 

「meta_compare」に、「=」(デフォルト)、「!=」、「>」、「>=」、「<」、「<」の指定をして異なる検索結果を得ることが出来ます。 meta_query 以下のように記述することで、「hoge」に「fuga」という文字列を含み、「foo」(配列)の値が「bar」を持たない記事を検索できます。 条件式の「compare」も追加されており、「LIKE」、「NOT LIKE」、「IN」、「NOT IN」、「BETWEEN」、「NOT BETWEEN」という曖昧な検索を行えるようになりました。 [php] query_posts( array( "meta_query" => array( array( "key" => "hoge", "value" => "fuga", "compare" => "LIKE" ), array( "key" => "foo", "value" => "bar", "compare" => "NOT IN" ) ) ) );[/php] 複数ソート むりくる http://www.seeds-std.co.jp/seedsblog/876.html http://globalit-academy.com/programming/wordpress%E3%81%A7%E8%A4%87%E6%95%B0%E3%81%AE%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%83%95%E3%82%A3%E3%83%BC%E3%83%AB%E3%83%89%E3%82%92%E5%AF%BE%E8%B1%A1%E3%81%AB%E3%82%BD%E3%83%BC%E3%83%88%E3%81%99/

(ライブ)スケジュール機能

スケジュール準備

未来記事表示 No Future Post
http://imasashi.net/blog/wordpress/future-info.html

もしっくは
ファンクション未検証http://istks.net/2300

function myfunc($data, $posts) {
if ($data['post_status'] === 'future' &amp;&amp; $posts['post_status'] === 'publish') {
$data['post_status'] = 'publish';
}
return $data;
}
add_filter('wp_insert_post_data', 'myfunc', 10, 2);

ループ みけん

<?php
function filter_where($where = '') {
$where .= " AND post_date > '" . date('Y-m-d', strtotime('0 days')) . "'";
return $where;
}
add_filter('posts_where', 'filter_where');
query_posts(array(
    'cat' => ※記事カテゴリーID,
    'order' => ASC,
));?>
<?php if (have_posts()) : ?>
<?while (have_posts()): the_post(); ?>
    ※ループ中身
<?php endwhile; ?>
<?php else : ?>
    ※予定が無い場合のメッセージ
<?php endif; ?>

カテゴリーページの場合みけん

<?php
function filter_where($where = '') {
$where .= " AND post_date > '" . date('Y-m-d', strtotime('0 days')) . "'";
return $where;
}
add_filter('posts_where', 'filter_where');
query_posts(array(
'cat' => get_query_var('cat'),
'order' => ASC,
));?>

アーカイブページみけん

<?php
  function filter_where($where = '') {
    $where .= " AND post_date > '" . date('Y-m-d', strtotime('1 days')) . "'";
    return $where;
  }
add_filter('posts_where', 'filter_where');
global $query_string;
query_posts($query_string . "&order=ASC");
?>

何日間とか指定
http://wpdocs.sourceforge.jp/%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%E3%82%BF%E3%82%B0/query_posts#.E6.97.A5.E6.99.82.E5.BC.95.E6.95.B0

何日から何日と指定
http://webcake.no003.info/webdesign/wp-queryposts-datesearch.html

記事が無い時ほかのページ みけん

http://ja.forums.wordpress.org/topic/21998?replies=5

本日の日付から過去30日間に書かれた最新記事を5件表示みけん
http://www.imamura.biz/blog/cms/wordpress/tips/8176

ignore_sticky_posts=1とは
http://mekemoke.jp/2012/10/428.html

検証結果===============

>< =><=がキーマン [php]function filter_where($where = '') {//フィルター $where .= " AND post_date > '" . date('Y-m-d', strtotime('0 days')) . "'";//AND post_date のあとの記号で未来過去をチェンジ return $where; } add_filter('posts_where', 'filter_where');[/php]