Forums Forums Search & Filter Pro reset query

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #232380

    Hello

    I want to reset my query so i can target each post even/odd with :nth. But it doesn’t seem to work when i use this in the results.php file:
    <?php wp_reset_postdata(); ?>
    <?php wp_reset_query(); ?>

    Any suggestions to how i can separate each post section from each other?

    Trevor
    #232383

    If you are running through the posts with a loop, then it would be easier to have a variable that is set alternately to:

    post-odd
    post-even

    And echo that in the classes of the element you wish to target.

    I am not sure why you need to reset the query?

    Anonymous
    #232459
    This reply has been marked as private.
    Trevor
    #232523
    This reply has been marked as private.
Viewing 4 posts - 1 through 4 (of 4 total)