Title: change navigation code help!!
Last modified: August 21, 2017

---

# change navigation code help!!

 *  Resolved [vl4d](https://wordpress.org/support/users/vl4d/)
 * (@vl4d)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/change-navigation-code-help/)
 * Hi.. plzz can help me anyone?? i try to fix this problem in my site, i want the
   navigation to be order by title and not by date..
 * the code
 *     ```
                       <div class="toolbar-right">
                       	<?php 
       					$auto_load = osp_get('ct_video_settings','auto_load_next_video');
   
                           // find previous and next post
       					$p = videopro_get_adjacent_post_video(null, 'prev', get_post($post_id));
                           $n = videopro_get_adjacent_post_video(null, 'next', get_post($post_id));
   
       					if((empty($p) || empty($n)) && $auto_load == '2'){
                               /* if $auto_load = 2, then prev link will go to last post. Thus, we look for last post */
                               $next_previous_same = osp_get('ct_video_settings','next_prev_same');
                               $next_video_only = osp_get('ct_video_settings','next_video_only');
                               if($next_previous_same == ''){
                                   $next_previous_same = 'cat';
                               }
   
                               if(isset($_GET['series']) && $_GET['series'] != ''){
                                   $next_previous_same = 'current-series';
                               }
   
                               if(isset($_GET['channel']) && $_GET['channel'] != ''){
                                   $next_previous_same = 'current-channel';
                               }
   
       						$f_query = videopro_query_morevideo($id_curr, $next_previous_same, $next_video_only, 1, empty($p) ? 'last' : 'first');
       						if(!empty($f_query)){
       							foreach ( $f_query as $key => $post ) : 
                                       setup_postdata( $post );
   
                                       empty($p) ? $p = $post : $n = $post;
       							endforeach;
       							wp_reset_postdata();
       						}
       					}
   
       					if(!empty($p)){
                               $pv_link = get_permalink($p->ID);
   
                               $pv_link = videopro_add_query_vars($pv_link);
   
       						?>
       						<a href="<?php  echo esc_url($pv_link);?>" class="btn btn-default video-tb font-size-1 cactus-new prev-video"><i class="fa fa-chevron-left"></i><span><?php echo esc_html__( 'Prev', 'video' )?></span></a>
       					<?php 
       					}
       					if(!empty($n)){
       						$nv_link = get_permalink($n->ID); 
                               $nv_link = videopro_add_query_vars($nv_link);
       						?>
                           	<a href="<?php echo esc_url($nv_link); ?>" class="btn btn-default video-tb font-size-1 cactus-old next-video"><span><?php echo esc_html__( 'Next', 'video' )?></span><i class="fa fa-chevron-right"></i></a>
       					<?php 
                           }
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [HudsonValleyWebDesign](https://wordpress.org/support/users/jaycbrf/)
 * (@jaycbrf)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/change-navigation-code-help/#post-9427467)
 * Link to site?
    Theme? Version of WordPress?
 * Please read the forum guidelines before posting: [https://wordpress.org/support/guidelines/](https://wordpress.org/support/guidelines/)
 *  Thread Starter [vl4d](https://wordpress.org/support/users/vl4d/)
 * (@vl4d)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/change-navigation-code-help/#post-9429191)
 * reason to post link from site?? and the version of wp is 4.8.1 you can see it
   🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘change navigation code help!!’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [vl4d](https://wordpress.org/support/users/vl4d/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/change-navigation-code-help/#post-9429191)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
