Change "Older/Newer entries" text on Portfolio pages

Hi there

Loving this theme so far. Just wondering if there is an easy way to change the “Older/Newer entries” text on Portfolio pages?

Thanks

Bibs

Hello Bibs,

You can accomplish it with these steps:

  1. Install and activate the TC Custom JavaScript plugin
  2. Go To Appearance > Custom JavaScript
  3. Paste the following code into the provided box
    (function($){

      var prevLabel = 'Older Portfolio';
      var nextLabel = 'Newer Portfolio';

      if( $('body').hasClass('post-type-archive-jetpack-portfolio') ) {

        $('.nav-previous a').text(prevLabel);
        $('.nav-next a').text(nextLabel);

      }

    })(jQuery);

4 . Update

Regards,
Kharis

Hi Kharis

I did exactly as instructed but no change I’m afraid. I still see “Older entries” and “Newer entries”. Do I need to do something more?

Thanks again

Bibs

Hello there,

Sorry for suggesting incorrect code – that was aimed for portfolio archive page. In order to make it works on portfolio page template too, replace it with this one:

    (function($){

      var prevLabel = 'Older Portfolio';
      var nextLabel = 'Newer Portfolio';

      if( $('body').hasClass('post-type-archive-jetpack-portfolio') || $('body').hasClass('page-template-template_portfolio') ) {

        $('.nav-previous a, .prev-posts-link a').text(prevLabel);
        $('.nav-next a, .next-posts-link a').text(nextLabel);

      }

    })(jQuery); 

Regards,
Kharis

Excellent that works this time :clap: Yay!

Thanks so much :smile:

Bibs