Divi – Changing Pagination Text

Divi – Changing Pagination Text

The Problem

Have a look at this screenshot. See anything annoying?

A lot of people seem to not like how it says “older entries” and “next entries” because.. it.. can’t be changed easily. (ET should really look into that)

So how do we fix this in an easy non-destructive way?

Note: The reason I say “easy non-destructive” is because the only way to edit this at the moment is to either
1. edit the module itself in the parent theme
– Divi > includes > navigation.php
which means it will go away when you update the parent theme, (destructive) or
2. add a function to the child theme’s functions.php file that will override Divi’s navigation.php and load a new one. (not too hard… but not as easy as copy pasting a snippet)

The solution

What we’re going to do is just use CSS to cover up the pagination text and add new letters via pseudo elements. Easy peasy.

.pagination .alignleft a {
	color: rgba(255,255,255,0);
	position: relative;
}
.pagination .alignleft a:after {
	content: "« More Results";
	position: absolute;
	text-align: left;
	width: 200px;
	left: 0;
	color: #111;
}
.pagination .alignright a {
	color: rgba(255,255,255,0);
 	position: relative;
}
.pagination .alignright a:after {
	content: "Previous Results »";
	position: absolute;
	text-align: right;
	width: 200px;
	right: 0;
	color: #111;
}

Of course, if you want to change the text, go ahead and edit the text inside the “” in content: “”;.

[sc name=”customcss”]

 

If you want to learn how to do all this yourself,

[sc name=”learn css”]

 

PS. If you want to go the php route, add a function named wp_pagenavi and get_template_part it to a new navigation.php in your child theme.

 

Photo by Thijs Slootjes on Unsplash

Get Breakdance

Breakdance is, in my opinion, the best page/site builder on the market, which is why all my tutorials use Breakdance. It's also why I have an affiliate link. You don't pay extra, but I get a little commission, so it helps support the site. Thanks!

Get ACF Pro

Another essential plugin for site building. This isn't an affiliate link, it's just for convenience.

Get WP Codebox Pro

If you'd like an easier to use, and more advanced code management plugin (instead of just editing and making files yourself) then WP codebox pro is for you. Adding php, js, and even SCSS. Pretty nice! Affiliate link below.

Blank Plugin

Sort of blank. It's made to be easy to use with the tutorials. Download and edit any way you see fit.
  1. Thank you!!

  2. Many thanks, super useful!

  3. Great tutorial, everything works well.

    • Hi William, Thanks! always happy to help!

  4. sorry but not working for me. The new text is displaying but the old text too! now i have both of them. I need to replace in it…

  5. my bad. forget to change color of the older 🙂 thanks

    • Hi Ramiro, no problem. Happy you sorted it out.
      Thanks

  6. Thanks so much. I had exactly 5 minutes to solve this for a client, and your post helped me do just that!

    • Hi Andrea,

      Thank you for your kind words, that sounds awesome! Always happy to help

  7. For some reason this isn’t working for me. It hides the default text but the alternate contents don’t render.

    • Hi Vince, could you please send me a link so I can see and help fix it? My email is my name@ this domain.

  8. Hey PK, thanks for this, it was just what I needed for a podcast website I’m hoping will go live in the next 24 hours. The only problem I had was the default text still showed under my preferred Previous/Next text. But what I did was set the colour of the default text to the same as the background – it’s there, but you can’t see it!

    • Hi Rob, that’s very clever haha

      Hope the podcast launch goes well!

  9. Thanks for the code.

    The words are replaced, but when you hover over the words, the original text is shown (in red in my case)

    Any suggestions?

Leave a Reply

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

New tutorials

Auto-updating Year in Footer
Designing Beyond the Brief
Disable Gutenberg Editor on some ACF pages
ACF flexible content fields in Breakdance 2.4

Got a question? ask!

If you have any question about the content on this page, feel free to send me an email by clicking the button below.

newsletter? sign up!

Sign up to the newsletter for updates on tutorials, news, and offers.

Join the cypher!

An awesome membership program for Breakdance Builder users coupled with an inclusive, friendly community.

Got a question?

If you have a question about something on this page, send me an email, and hopefully I can answer, and we can solve it!