I set the pagination parameters in functions.php and echoed where I want the links to appear, so far so good.

The problem is that the previous and next texts are not modifying. I put a random text to see what appears. The texts of the images below are shown, they are even translated into my language (pt-br)…

How can i modify them?

enter image description here

enter image description here

<?php $args = array(
'base'               => '%_%',
'format'             => '?paged=%#%',
'total'              => 1,
'current'            => 0,
'show_all'           => false,
'end_size'           => 1,
'mid_size'           => 2,
'prev_next'          => true,
'prev_text'          => __('jdsjj'),
'next_text'          => __('jhdsh'),
'type'               => 'list',
'add_args'           => false,
'add_fragment'       => '',
'before_page_number' => '',
'after_page_number'  => ''); ?>

<!-- Pagination links echoed in my home page -->
<?php echo paginate_links( $args ); ?>

2 s
2

I found out a way that you can place any text. You just need to create an array where you want the paginate_links to appear.

<!-- Put this in your functions.php -->
<?php $args = array(
   'base'               => '%_%',
   'format'             => '?paged=%#%',
   'total'              => 1,
   'current'            => 0,
   'show_all'           => false,
   'end_size'           => 1,
   'mid_size'           => 2,
   'add_args'           => false,
   'add_fragment'       => '',
   'before_page_number' => '',
   'after_page_number'  => ''); ?>

<!-- Put this where you want the paginate_links to appear -->
<?php echo paginate_links( array(

  'prev_text' => '<span>Any text Previous</span>',
  'next_text' => '<span>Any text Next</span>'

)); ?>

Leave a Reply

Your email address will not be published. Required fields are marked *