Hi, junx0r:
You can style your prev/next links by defining a “Link Wrapper Element” and “Link Wrapper Element Class” in the “Pagination Styles” module. We’ve considered integrating a feature that would add a specific variable to each class (eg., class-1, class-2) so users can style each individual page link. But this feature is still forthcoming.
For now, then, if you want to target a specific page link, such as previous or next, you can use the nth-child pseudo class (http://css-tricks.com/how-nth-child-works/).
Concerning your second point, PLP doesn’t offer a way to add HTML elements before or after the pagination string. As such, it’s probably easiest to just edit your theme. Find the wp_link_pages function and just add your ad/message div before or after.
Thanks for your interest in PLP.
Thread Starter
junx0r
(@junx0r)
I see it is possible to insert HTML before and after the pagination string though, for example by default you insert <p>Pages, I see there’s an option for it.
Is there a reason I can’t insert a div there?
Where is that field that gets inserted before the pagination string in the code? I could add my code straight there in the source.
Let me know if there’s a flaw with my thinking here.
Hi, junx0r:
I’ve just tested the following content in the Pagination Styles > “Before” text box:
<div></div><p>Pages:
And it seems to work just fine.
It wasn’t designed to accommodate the approach you outline, but I’m thrilled it does. Thanks for finding yet another thing PLP can do!
Thread Starter
junx0r
(@junx0r)
Thanks. If I wanted to add that code in the php file that processes the pagination (not through the WordPress interface), where would I add it? What file/line?
The code I want to add would end up being a bit too long to insert through a text field.
Thank you!
Hi, junx0r:
I would advise against editing the plugin code.