Use on archive pages (like custom author.php)
-
I’m a longtime fan of both WP-Print and WP-Email, but I’ve encountered a problem I have also recently encountered with sharing plug-ins, having to do with treatment of archive and other pages.
In short, as you will be aware, such pages do not register as “normal” pages or, obviously, as posts, and do not utilize the Loop. Adding your php snippets won’t for the same reason suffice to make them printable or mailable either.
One problem is that get_the_permalink() won’t work: In some instances it will return the last post rather than the current actual URL. In other places it will lead to 404 errors. It’s easy to substitute a different code to get the actual page URL, but, while that will be sufficient to make a simple sharing application work – tweeting a link to an authors/authorname/ biography page, for example – it’s not enough to make WP-Print or WP-Email follow through, for instance by generating the required authors/authorname/printpage page with WP-Print.
I’ve mainly experimented with hacking WP-Print, because it’s simpler, but the 404 errors are also produced under WP-Email even after replacement of get_permalink(). I wonder whether you’ve looked into this question already or if you could provide some hints for adding the functionality to both plug-ins.
- The topic ‘Use on archive pages (like custom author.php)’ is closed to new replies.