Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Kurse
- */
- get_header();
- // gets all posts next 30 days ans last 7 days
- function kurse_where($where = '')
- {
- $where .= " AND post_date >= '".date('Y-m-d', strtotime('-7 days'))."'
- AND post_date <= '".date('Y-m-d', strtotime('+30 days'))."' ";
- return $where;
- }
- add_filter('posts_where', 'kurse_where');
- // parameter: only catagorie "Kurse" and normal order: past top, future down
- query_posts("category_name=Kurse&order=asc");
- // here the normal code like index.php to list the posts
RAW Paste Data