wp_link_pages code produces ampersand invalid markup
-
I have searched for this but can’t find an answer as yet.
My page.php file uses the follwing code to generate navigation links:
<?php wp_link_pages('before= &after= &next_or_number=next &previouspagelink=Go back &nextpagelink=Next page'); ?>
However, the HTML code it generates produces ampersands that the WC3 validator doesn’t like:
<a href="https://www.thedrumdoctor.net/?page_id=184&page=5">Go back </a><a href="https://www.thedrumdoctor.net/?page_id=184&page=7">Next page</a>
I’m using XHTML 1.0 Strict as my doctype and it doesn’t like the page_id=184&page ampersands. Is there a way of tweaking the PHP code so it will produce ampersands in escape characters, so it will parse correctly in the validator?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp_link_pages code produces ampersand invalid markup’ is closed to new replies.