• I dont know if I am being really thick. But where exactly do you set the anchor text to take the title name of the page?

    All I get returned are Next and Previous as links, but I want to convert these anchor texts to the page titles. Can you let me know where in the code I set this and which file. I assume its in the plugin php file where this is set? Where do I add %title into the string for the front end. For example I am using:

    <div class="box">
    <?php
     $nextPage = next_page_not_post('Next', 'false', 'sort_column=post_date&sort_order=desc');
     $prevPage = previous_page_not_post('Previous', 'true', 'sort_column=post_date&sort_order=desc');
    
     if (!empty($nextPage) || !empty($prevPage)) {
     echo '';
    
     if (!empty($nextPage)) echo '<p>Next<br>'.$nextPage.'</p>';
     if (!empty($prevPage)) echo '<p>Previous<br>'.$prevPage.'</p>';
    
     echo '</ul>
    ';
     }
    ?>
    </div>

    https://www.ads-software.com/plugins/next-page-not-next-post/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try removing the ‘Next’ and ‘Previous’:

    $nextPage = next_page_not_post('', 'false', 'sort_column=post_date&sort_order=desc');
    $prevPage = previous_page_not_post('', 'true', 'sort_column=post_date&sort_order=desc');

    Thread Starter allencg

    (@allencg)

    That’s perfect. Thanks so much.

    I also added %title to be sure and it works fine now.

    $nextPage = next_page_not_post('%title', 'false', 'sort_column=post_date&sort_order=desc');
     $prevPage = previous_page_not_post('%title', 'true', 'sort_column=post_date&sort_order=desc');
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Anchor text’ is closed to new replies.