WordPress.org

Ready to get started?Download WordPress

Forums

Byline
Author meta data has invalid formatting (10 posts)

  1. Joe M
    Member
    Posted 1 year ago #

    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/

  2. mattdu
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. Richard
    Member
    Posted 1 year ago #

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

  4. mattdu
    Member
    Plugin Author

    Posted 1 year ago #

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

  5. mpmchugh
    Member
    Posted 1 year ago #

    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.

  6. mpmchugh
    Member
    Posted 1 year ago #

    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>

  7. mattdu
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  8. mpmchugh
    Member
    Posted 1 year ago #

    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.

  9. mpmchugh
    Member
    Posted 1 year ago #

    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?

  10. mattdu
    Member
    Plugin Author

    Posted 1 year ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.