$f_autoplay= types_render_field("autoplay", array());
if ( !is_single() && $f_autoplay ) :
$f_permalink= esc_url( get_permalink() );
echo "<a href='$f_permalink'>View Autoplay Embedded Data »</a>";
else :
the_content( sprintf(
__( 'Continue reading %s', 'twentyfifteen' ),
the_title( '', '', false )
) );
endif;
タグ: WordPress
公開終了期限で投稿リストを並べ替える
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'paged' => $paged,
'orderby' => 'meta_value_num',
'order' => 'ASC',
'meta_key' => '_expiration-date',
'tax_query' => array(
array(
'taxonomy'=>'status',
'terms'=>array( 'expired' ),
'field'=>'slug',
'operator'=>'NOT IN'
),
'relation' => 'AND'
)
);
$wp_query = new WP_Query($args);
公開終了コンテンツのフィルタ
if ( $query-> is_archive() || is_home() ) :
$query->set('tax_query',
array(
array(
'taxonomy'=>'status',
'terms'=>array( 'expired' ),
'field'=>'slug',
'operator'=>'NOT IN'
)
)
);
return;
endif;
Colorboxのショートコード化
WordPressが出力したギャラリーをライトボックス化するショートコードを作成してみました。
“Colorboxのショートコード化” の続きを読む