Is it possible to use Co-Authors Plus without modifying theme?
-
Hi Daniel,
Thanks for the plugin, it’s very useful.
I was wondering if there’s any way I can modify the plugin code so that I don’t need to modify my site’s theme?Normally I would just create a child-theme and modify the templates as outlined in the plugin’s instructions, however I’ve recently switched to the NomNom theme, which is a child-theme of TwentyEleven.
Since it’s not possible to create a child-of-a-child-theme, this means that when NomNom is updated, the changes to the template files are wiped out.One of the things NomNom provides is a file called custom-functions.php which is left intact after a theme upgrade, and is where you’d normally place anything that would go in functions.php, so I thought I might try adding filters in custom-functions.php to catch anything author related and output the Co-Author Plus equivalents instead.
I’ve tried adding a filter to return coauthors() when get_the_author() is called, however it had no effect. When I added the filter to the_author() instead, I ended up in recursive loops.
I’m still pretty new to WordPress, though not to PHP, so I think it’s possible I’m adding the filter to the wrong hook.
Is it possible to use Co-Authors Plus via filters?Many thanks,
Mark
- The topic ‘Is it possible to use Co-Authors Plus without modifying theme?’ is closed to new replies.