puffin
MemberForum Replies Created
-
What do you mean by scripting – where would it be needed?
I might add that I only want to display ONE post – just the next concert.
I still have this problem.
I seem to be taking to myself – no-one has added any suggestions!
I tried yet another option without success.
height: auto;
doesn’t work! Surely there must be a way?
Just tried another 2 options and neither work.
height: 100%;
removing the height altogether
Does anyone have any other suggestions?
Set up a new page called Archive (or similar). Make sure the new page doesn’t appear in the Menu.
Make your page a child of Archive.
Wonderful – Thank you
Those are my posts names! They are concert dates.
Fixed !!!
I removed this line and it works!!
query_posts($query_string . 'category_name=concerts&order=ASC');
It is the only way that I can see to have future concerts on one page and past concerts on another. I am running no-future-posts because I want one of the future concerts on the header slider and can’t see any other way to do that either.
I tried using list-category-posts but can’t see how to make that work with date selection either. Also that method doesn’t seem to show the gallery.
Do you have any other suggestions?
Here is the code for the page template
<?php
/**
* Template Name: future_concerts
*/
get_header(); ?>
<?php
/* Run the loop to output the pages.
* If you want to overload this in a child theme then include a file
* called loop-page.php and that will be used instead.
*/
the_post();
get_template_part( 'loop', 'page' );
/* Check if the user selects specific category for the templated page */
$cats = 'concerts'; // Change these category SLUGS to suit your use.
// Display the posts from the category with a post_date in the future
$args= array(
'category_name' => $cats
);
// The Query
// $the_query = new WP_Query( $args );
function filter_where($where = '') {
$where .= " AND post_date >= '" . date('Y-m-d') . "'";
return $where;
}
add_filter('posts_where', 'filter_where');
query_posts($query_string . 'category_name=concerts&order=ASC');
$my_query = new WP_Query('category_name=concerts&order=ASC');
// The Loop
// while ( $the_query->have_posts() ) : $the_query->the_post();
while ($my_query->have_posts()) : $my_query->the_post();
// echo '<li>';
// the_title();
// the_content();
get_template_part( 'loop', 'index' );
// echo '</li>';
endwhile;
/* Posts navigation. */
graphene_posts_nav();
// Reset Post Data
wp_reset_postdata();
?>
<?php get_footer(); ?>
Viewing 9 posts - 1 through 9 (of 9 total)