*

Verax

  • *
  • 2 posts
Hi everyone,

How can i echo item title in navlinks instead of <Previous> and <Next>?

Thanks a lot to everyone will help me to solve this!


*

MB Themes

You should be able to find these in header.php and change label on links.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Verax

  • *
  • 2 posts
Thanks for the reply.

i found this: 

<div class="navlinks">
            <?php if($prev_link !== false) { ?><a href="<?php echo $prev_link; ?>" class="prev"><i class="fas fa-angle-left"></i> <?php _e('Previous'); ?></a><?php } ?>
            <?php if($next_link !== false) { ?><a href="<?php echo $next_link; ?>" class="next"><i class="fas fa-angle-right"></i> <?php _e('Next'); ?></a><?php } ?>
          </div>

I have replaced <?php _e('Previous'); ?> with <?php echo osc_item_title(); ?>but it shows me the title of the current ad. I would like to show instead of <Previous> the title of the previous ad and instead of <Next> the title of the next ad.

Which command should I enter instead of <?php _e('Previous'); ?> or <?php _e('Next'); ?> ?

Thanks in advance!!!

*

MB Themes

Use id > get item > get title.
$item = Item::newInstance()->findByPrimaryKey($id);
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots