Support

Account

Forum Replies Created

  • I have been able to work this out. Doing a bit of research and working through the code I have gotten this working.

  • Thanks John,
    I had thought of this as well after I posted this. I had actually got up from bed wrote down some notes and thumbnails on this and then went back to bed. I tried this and it worked perfectly.

    Thanks,
    Vince

    P.S. Loving this plugin and want to learn more about this and how to use it.

  • Thanks for the response James. Sorry I haven’t had a chance to get back to this. I haven’t looked at this for a while as I was trying to finish the rest of the site and knew I could come back to this.

    The page I am trying to have to user sort is located at:

    CSCM results

    If you could take a quick look at this and the code I had above and point me in the direction I need to go to be able to have the user sort the field so they can select from a dropdown which athlete they would like to see the results.

    And do you know if there is any way that we can add users in the backend?

    Thanks for all the help.

  • Hi James,

    Thanks for all the help. I am really new to all of this. I am kinda lost with everything.

    Here is the complete code for the results page that I have so far.

    <section class="col-sm-12 col-md-9 athlete main-content">
              <div class="athlete-name page-header">
                <h2 class="heading"><?php the_title();  ?></h2>
              </div><!-- /.athlete-name -->
    
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post();  ?>
    
                <?php the_content();  ?>
    
                <?php endwhile; endif; ?>
    
    <hr>
                <?php
                  
                  //wp_reset_postdata();
                  $args = array(       
                    'post_type' => 'result',
                    'category_name' => 'results',
                    'orderby' => 'date',
                    'order'   => 'ACS',
                    'posts_per_page'  =>  15,
                    'paged'             =>  $paged
                    );
                  $the_query = new WP_Query( $args );       
                  //wp_reset_postdata();
    
                ?>
    
                <div class="col-md-12 index-results-Section">
    
                  <?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
    
                  <div class="index-resultsSingle">
                         <div class="col-md-2 index-resultsAthlete">
                         <a href="<?php the_field('page_link'); ?>"><?php the_field( 'result-athlete' ); ?></a>
                      </div><!-- .index-resultsAthlete -->
    
                      <div class="col-md-7 index-resultsSport">
                       <?php the_field( 'result-sport' ); ?>
                         <?php the_field( 'result-date' ); ?>
                       </div> <!-- .index-resultsSport -->
    
                        <div class="col-md-3 index-resultsResult">
                          <?php the_field( 'result-result' ); ?>
                        </div> <!-- .index-resultsResult -->
    
                      <div class="clearfix"></div>
    
                   </div>
    
                  <?php endwhile; endif; ?>
    
    <div class="row"> <!-- Next and Previous -->
                      <?php if ($the_query->max_num_pages > 1) { // check if the max number of pages is greater than 1  ?>
                        <nav class="prev-next-posts">
                          <div class="col-md-4 prev-posts-link">
                            <?php echo next_posts_link( '< Older Results', $the_query->max_num_pages ); // display older posts link ?>
                          </div>
                          <div class="col-md-4 col-md-offset-4 next-posts-link">
                            <?php echo previous_posts_link( 'Newer Results >' ); // display newer posts link ?>
                          </div>
                        </nav>
                      <?php } ?>
                  </div>
                <div class="clearfix visible-sm"></div>
    
                </div>
            </section><!-- .athlete main-content -->

    Here is a link of something they would like it to be like.

  • Hi James,

    Not sure if this will work. I have made a custom post type with the ACF of athlete, result and date. I would like the user to be able to sort the list via dropdown (or some other way) to only show a certain athletes result. If you click on any name it will take you to the athlete profile page.

Viewing 5 posts - 1 through 5 (of 5 total)