Compatibility with Bylines plugin
-
We use the Bylines plugin to create author names for a post without creating a full WordPress user every time.
Unfortunately, DPT doesn’t display author names/links properly when the Bylines plugin is enabled. The HTML is double-encoded, and you see the author’s
<a>
tag show up as text on the frontend.To fix this, I made the following change to
frontend/class-register.php
, starting at line 453:/** * Display post entry author. * * @since 1.0.0 */ public function author() { Markup::markup( 'dpt-author', array( function() { return the_author(); // printf( // '<a href="%s"><span>%s</span></a>', // esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), // esc_html( get_the_author_meta( 'display_name' ) ) // ); } ) ); }
Please consider updating this plugin so it just uses the
the_author()
hook here, instead of putting the different pieces of the author link together manually.
- The topic ‘Compatibility with Bylines plugin’ is closed to new replies.