🏄♂️
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 | |
function filter_where($where = '') { | |
$where .= " AND post_date >= '2009-03-17' AND post_date <= '2009-05-03'"; | |
return $where; | |
} | |
add_filter('posts_where', 'filter_where'); | |
query_posts($query_string); | |
while (have_posts()) : | |
the_post(); | |
the_content(); |
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 | |
query_posts('showposts=8'); | |
$ids = array(); | |
while (have_posts()) : the_post(); | |
$ids[] = get_the_ID(); | |
the_title(); | |
the_content(); | |
endwhile; | |
?> |
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 query_posts('meta_key=review_type&meta_value=movie'); ?> | |
<?php if (have_posts()) : ?> | |
<?php 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 | |
$current_day = date('j'); | |
$last_year = date('Y')-1; | |
query_posts('day='.$current_day.'&year='.$last_year); | |
if (have_posts()): | |
while (have_posts()) : the_post(); | |
the_title(); | |
the_excerpt(); | |
endwhile; | |
endif; |
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 | |
/* | |
Template Name: Archives | |
*/ | |
?> | |
<?php get_header(); ?> | |
<h2><?php $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'"); | |
if (0 < $numposts) $numposts = number_format($numposts); ?> |
OlderNewer