Turtles
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Fixing WordPress
In reply to: Complex query. Don't know where to startIt’s working with 1 loop per year. It suits me.
I found the code somewhere else and just add the date condition.
For example for year 2011 :<?php //for each category, show one post $cat_args=array( 'orderby' => 'name', 'order' => 'ASC' ); $categories=get_categories($cat_args); foreach($categories as $category) { $args=array( 'showposts' => 1, 'category__in' => array($category->term_id), 'caller_get_posts'=>1, 'year'=>2011 ); $posts=get_posts($args); if ($posts) { echo '<p><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </p> '; foreach($posts as $post) { setup_postdata($post); ?> <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p> <?php } // foreach($posts } // if ($posts } // foreach($categories ?>
Forum: Fixing WordPress
In reply to: Complex query. Don't know where to startStill digging into queries.
I will give a try with multiple queries, 1 per year as it will dramatically simplify the query and make it simple to put my divs containing years.
<div>2014</div>
-article
-article
-article
<div>2013</div>
-article
etcForum: Fixing WordPress
In reply to: Impossible letters in the comment textareaOk Chadrew. Thanks for the hint !
I’ll try to unactive each JS to see where is the problem.
Forum: Fixing WordPress
In reply to: Impossible letters in the comment textareaI still have no idea how to correct this weird bug.
Any idea ?
Thanks
Viewing 4 replies - 1 through 4 (of 4 total)