WordPress.org

Support

Support » Plugins and Hacks » Byline » Author meta data has invalid formatting

Author meta data has invalid formatting

  • Joe M

    @jmarrancaaaaaorg

    We like the premise behind this plug-in, particularly its attempt to provide a solution that doesn’t require modifications to the theme templates.

    Unfortunately, we’ve had an issue with the plug-in that is preventing its use. When we add a byline for someone, say Jim Smith, and then publish the post, the author meta data visible under the post title is something like:

    Jim Smith”>Jim Smith — May 16, 2013

    When I view the source code, I can see how the associated data was processed by the loop:

    <span class="the-author"><a href="http://blogurl.com/author/webmaster/" title="<a href=" http:="" blogurl.com="" byline="" jim-smith="" "="" rel="tag">Jim Smith</a>"><a href="http://blogurl.com/byline/jim-smith/" rel="tag">Jim Smith</a>&nbsp;—&nbsp;</span>

    I have not been able to determine where the extra <” is coming from. Do you have any ideas?

    We’ve had no issues during installation, and are running on WordPress 3.5.1. We’d be delighted to get the plug-in working, as we’re hoping to use this exact functionality in an upcoming blog.

    Thanks!
    -Joe M

    http://wordpress.org/extend/plugins/byline/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author mattdu

    @mattdu

    What I have found in cases like this is that the theme is calling the author information with some custom code.

    The byline plugin requires that the theme use the_author() to call up the author name/link.

    If you’re versed in php you can place this bit of code where you want the author-byline to appear:

    <?php the_author(); ?>

    From that it’s just a matter of placing it in the right div or span to appear the way you want it to.

    I had the same problem. I changed the_author (), but links now refer to 404 page.

    Plugin Author mattdu

    @mattdu

    Richard, can you post a link so I can look into it?

    I’m having the same problem withe theme I’m using. I looked, and the theme’s meta.php file is calling the author with the standard <?php the_author(); ?> already:

    <a href="<?php echo get_author_posts_url(get_the_author_meta( 'ID' )); ?>" title="<?php _e('View all posts by', 'minti'); ?> <?php the_author(); ?>"><?php the_author(); ?></a>

    I’ve used byline with the TwentyTelve theme successfully though.

    Here’s an example of the output I’m getting with two bylines, for instance:

    Jane Doe, John Smith”>Jane Doe, John Smith

    and the source:

    <span class="meta-author"><i class="icon-user"></i><a href="http://dev.site.com/wordpress/author/david/" title="View all posts by <a href="http://dev.site.com/wordpress/byline/jane-doe/" rel="tag">Jane Doe</a>, <a href="http://dev.site.com/wordpress/byline/john-smith/" rel="tag">John Smith</a>"><a href="http://dev.site.com/wordpress/byline/jane-doe/" rel="tag">Jane Doe</a>, <a href="http://dev.site.com/wordpress/byline/john-smith/" rel="tag">John Smith</a></a></span>

    Plugin Author mattdu

    @mattdu

    That code is calling up other author information and wrapping the_author in a custom link. I think this is causing a link to be generated inside a link, so we aren’t getting the intended result.

    In your meta.php, try replacing the entire block starting with <a href="<?php echo get_author... to the closing </a> with simply <?php the_author(); ?>

    If you want you can wrap the php string in a DIV or SPAN with a class or ID to give you some control.

    Hmm. That did fix the HTML display, so that it does not look broken, but the links are now behaving oddly. Regular authors with no Byline have no link, and Byline authors have links in the form of…

    <a href="http://dev.site.com/wordpress/byline/jane-doe/" rel="tag">Jane Doe</a>, <a href="http://dev.site.com/wordpress/byline/john-smith/" rel="tag">John Smith</a>

    …but the links go to the 404 page.

    I guess I need to dig around in the function code to see if they are highjacking the the_author(); elsewhere.

    Per the author, they are not doing anything with the_author except calling it in two files:

    Inovado is not doing anything with the_author.

    meta.php
    single.php

    are the only files that are using the_author

    The meta.php was the one I was working with.

    Any other suggestions on how to perhaps fix this?

    Plugin Author mattdu

    @mattdu

    At first blush I would say the 404 is coming from a problem with permalinks. I’m not sure what the fix would be, except to perhaps reset your permalinks to the default, then back to the “pretty” format.

    So unfortunately right now, you can either list the author (the wordpress user) OR you can list byline names. So if you want to display the author with a link, I believe the function is the_author_link(); instead of the_author();

    If someone wants to try that and let me know if it breaks the plugin, let me know. Thanks for your patience!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Author meta data has invalid formatting’ is closed to new replies.
Skip to toolbar