Support » Plugin: Advanced Custom Sort » [Plugin: Advanced Custom Sort] Gives endless loop of posts

  • Resolved MtnExile

    (@mtnexile)


    I have this problem on a static page on which I want a single category of posts to show up. Before, I had used this

    <?php query_posts('cat=6'); while (have_posts()) : the_post(); ?>

    and it gave me the results I wanted, but in the standard reverse chronological order. So I used this instead

    <?php $acs->query_posts(array('Case' => 'My Group')); ?>

    and I simply got the name of the page printed over and over and over…

    Now, part of the problem might be that I have no idea what ‘My Group’ refers to, so perhaps that’s wrong. But frankly, this is the same problem I had, minus the recursive issues, before I inserted the original query_posts. I need a list of posts to show up, of only one category, and in sortable order. I’ve managed to get the first two.

    http://wordpress.org/extend/plugins/advanced-custom-sort/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author logikal16

    (@logikal16)

    Look at the screenshots page: http://wordpress.org/extend/plugins/advanced-custom-sort/screenshots/

    From the screenshot, the group name is “My Custom Ordered Posts”.

    $acs->query_posts(array('group_name' => 'My Custom Ordered Posts'));

    Thread Starter MtnExile

    (@mtnexile)

    Well, that helped, but we’re still not there.

    This is the entire block of relevant code:

    <div class="static" id="casePosts" style="display: block;">
    
        <?php $acs->query_posts(array('group_name' => 'Case')); ?>
    
        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
            <h6 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h6>
    
            <div class="entry-content">
                <?php the_excerpt(); ?>
                <p class="readMore"><a href="<?php the_permalink(); ?>">More »</a></p>
            </div><!-- .entry-content -->
    
        </div><!-- #post-## -->
    
    </div>

    You can see, I’ve made the change to the $acs query_posts, but I still just get the title of the page instead of the posts in that category. It’s not recursive now–it only prints it out once–but it’s still wrong.

    Plugin Author logikal16

    (@logikal16)

    http://codex.wordpress.org/Function_Reference/query_posts#Usage

    It should look more like this (notice the while Loop):

    <div class="static" id="casePosts" style="display: block;">
    
        <?php $acs->query_posts(array('group_name' => 'Case')); ?>
    
        <?php while ( have_posts() ) : the_post(); ?>
    
        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
            <h6 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h6>
    
            <div class="entry-content">
                <?php the_excerpt(); ?>
                <p class="readMore"><a href="<?php the_permalink(); ?>">More »</a></p>
            </div><!-- .entry-content -->
    
        </div><!-- #post-## -->
    
        <?php endwhile; ?>
    
    </div>
    Thread Starter MtnExile

    (@mtnexile)

    Yes! That worked. Imagine…using a while loop will actually call multiple posts. Who’da thunk?

    /sarcasm directed at self

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Advanced Custom Sort] Gives endless loop of posts’ is closed to new replies.