coyacreative
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: List posts by Alpha w/ letter headingsThanks, vtxyzzy. I will give it a shot.
Forum: Fixing WordPress
In reply to: List posts by Alpha in Category LoopHere is my revised/slimmed down version of the loop-category.php.
<?php while ( have_posts() ) : the_post(); ?> <li><h2><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <?php echo get_post_meta($post->ID, 'description', true); ?> <br/><br/></li> <?php endwhile; ?>
Any way to alpha order this? All of my attempts show ALL posts alpha… the code above shows only posts within that category. I just need to alpha order them.
Any help is much appreciated.
Thanks!
Forum: Fixing WordPress
In reply to: List posts by Alpha w/ letter headingsDoes it make any sense that only the letters XYZ have been disabled?
<div class="alpha"> <?php for($i=ord('A');$i<=ord('Z');$i++) { echo '<a class="alphalist" href="#'.chr($i).'">'.chr($i).'</a>'; } ?> </div> <?php $args=array( 'cat' => '-52,-101', 'orderby' => 'title', 'order' => 'ASC', 'posts_per_page'=>-1, 'caller_get_posts'=>1 ); $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); $this_char = strtoupper(substr($post->post_title,0,1)); if ($this_char != $last_char) { $last_ord = ord($last_char); while ( $last_char >= 'A' && (ord($this_char) - $last_ord) > 1) { ++$last_ord; $last_char = chr($last_ord); echo '<a name="'.$last_char.'"></a><h2>'.$last_char.'</h2><p>(No Listings)</p>'; } $last_char = $this_char; echo '<a name="'.$last_char.'"></a><h2>'.$last_char.'</h2>'; } ?> <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a><br/> <?php echo get_post_meta($post->ID, 'description', true); ?> </p> <?php endwhile; } wp_reset_query(); ?>
They appear in the nav. but do not display ‘No Listing’.
Forum: Fixing WordPress
In reply to: List posts by Alpha w/ letter headingsWorked perfectly.
Thanks so much!Forum: Fixing WordPress
In reply to: queried posts but need to disable linking on certain onesAwesome! This did the trick.
Thanks.
Forum: Fixing WordPress
In reply to: Filtering categories within a loop/query_posts<?php $acs->query_posts(array('group_name' => 'People')); ?>
Thanks, esmi. But I just realized the plugin Advance Custom Sort for posts is causing this to not work.
I am using the sort list for grid view – but am needing the same ‘group’ on the homepage, but to manually remove a few posts.
I have contacted the plugin developer – I hope it’s possible.