I am currently working on my wordpress site and have started to use a timeline. There are next/previous buttons in the post, but I want them to display the post title instead of Next/Previous. I have looked over the wordpress code for this, but the dev is using non-standard code to achieve it.
Could somebody take a look at the code and tell me what I need to change.
<div class="clearfix"></div>
</div>
<div class="timeline-info">
<div class="timeline-content">
<?php
$content = preg_replace ('#<embed(.*?)>(.*)#is', ' ', get_the_content(),1);
$content = preg_replace ('@<iframe[^>]*?>.*?</iframe>@siu', ' ', $content,1);
$content = preg_replace ('/<source\s+(.+?)>/i', ' ', $content,1);
$content = preg_replace ('/\<object(.*)\<\/object\>/is', ' ', $content,1);
$content = preg_replace ('#\[video\s*.*?\]#s', ' ', $content,1);
$content = preg_replace ('#\[audio\s*.*?\]#s', ' ', $content,1);
$content = preg_replace ('#\[/audio]#s', ' ', $content,1);
preg_match_all('#\bhttps?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))#', $content, $match);
foreach ($match[0] as $amatch) {
if(strpos($amatch,'soundcloud.com') !== false){
$content = str_replace($amatch, '', $content);
}elseif(strpos($amatch,'youtube.com') !== false){
$content = str_replace($amatch, '', $content);
}
}
$content = preg_replace('%<object.+?</object>%is', '', $content,1);
echo apply_filters('the_content',$content);?>
</div>
</div>
<?php
$we_sevent_navi = get_option('wpex_navi');
if($we_sevent_navi!='no'){
$wpex_navi_order = get_option('wpex_navi_order');
$preevtrsl = get_option('wpex_text_prev')!='' ? get_option('wpex_text_prev') : esc_html__('Previous article','wp-timeline');
$nextevtrsl = get_option('wpex_text_next')!='' ? get_option('wpex_text_next') : esc_html__('Next article','wp-timeline');
if($wpex_navi_order!='ct_order'){ ?>
<div class="timeline-navigation defa">
<div class="next-timeline">
<?php next_post_link('%link', $nextevtrsl) ?>
</div>
<div class="previous-timeline">
<?php previous_post_link('%link', $preevtrsl) ?>
</div>
</div>
<?php
}else{
wpex_next_previous_timeline($preevtrsl,$nextevtrsl);
}
}?>
<div class="clearfix"></div>
</div>
</div>