Home › Forums › Welcome! › Pre-Sales Questions › Wrong nav link in category
- This topic has 3 replies, 1 voice, and was last updated 10 years ago by
Brook.
-
AuthorPosts
-
April 26, 2016 at 6:42 am #1107050
Romain Biard
GuestHi all,
I’m facing an issue with nav links on a client’s website.
I have a category called Friday Lunch Meetings, that I display right from the menu of the website. The problem is, when I click on the previous events link, I’m redirected directly to page 2, which is a pain in the ass, because if I want to see the events from last month for instance, I then have to click on next events. The users are completed lost.Do you have any idea why this link points directly to page 2?
Here is the code of the file list/nav.php that I have in my theme folder:
<?php if ( tribe_has_previous_event() ) : ?> <li class="<?php echo tribe_left_navigation_classes(); ?>"> <a href="<?php echo esc_url( tribe_get_listview_link() ); ?>" rel="prev"><?php _e( '<span>«</span> Previous Events', 'tribe-events-calendar' ) ?></a> </li><!-- .tribe-events-nav-left --> <?php endif; ?> <!-- Right Navigation --> <?php if ( tribe_has_next_event() ) : ?> <li class="<?php echo tribe_right_navigation_classes(); ?>"> <a href="<?php echo esc_url( tribe_get_listview_link() ); ?>" rel="next"><?php _e( 'Next Events <span>»</span>', 'tribe-events-calendar' ) ?></a> </li><!-- .tribe-events-nav-right --> <?php endif; ?>Thanks a lot for your help.
Romain
April 26, 2016 at 1:51 pm #1107335Brook
ParticipantHowdy Romain!
That definitely sounds off. In the usual installs you can see the “<< All Events” button typically takes you back to page 1. Example.
If your site is doing something other than this then it is likely the result of a conflict. This guide walks you through how to test for a conflict, and then identify what is conflicting.
If you need further help would you mind logging in so I can verify your support access? Or, if you don’t have/want a license (which includes a year of support) you should checkout the volunteer community on WordPress.org: The Events Calendar. It’s not the same level of support, but it’s free! We even check those forums once each week and help to the extent we can.
Cheers!
– Brook
April 28, 2016 at 5:02 am #1108136Romain Biard
GuestHi Brook,
Thanks for this feedback.
After digging in the views file of the plugin folder and comparing them to the on I had in tribe-events, I realized that the functions used where tribe_get_listview_link instead of tribe_get_listview_next_link and tribe_get_listview_prev_link.Thanks for your help.
RomainApril 28, 2016 at 5:18 am #1108139Brook
ParticipantOh I missed that in your example code. I am happy you were able to narrow it down. Thanks for getting back Romain.
Cheers!
– Brook
-
AuthorPosts
- The topic ‘Wrong nav link in category’ is closed to new replies.
