• Resolved PIdev

    (@pidev)


    Hi there,

    We’re having some issues when there’s comma in author name = it’s recognized as two authors on frontend

    Check this screenshot: https://prnt.sc/VKNff1YxfGt8
    (We need to be able to include commas in author names sometimes unfortunately)

    Another issue – we would like to add comma before ‘and’
    – so ‘and’ should be ‘, and’ -> If I change delimiter for last two authors in plugin setting = it’s adding space before comma
    Check this screenshot: https://prnt.sc/f4h4xuLRTMrR

    We need quick fix on this as we need to publish website soon

    * we’re considering PRO version of plugin but it seems same issues are on PRO version as well (tested using Try demo on your website)
    – check this screenshot: https://prnt.sc/bQ72307H-s1g

    Hope you can fix this asap.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter PIdev

    (@pidev)

    Hi there – Any news/feedback on this?

    Plugin Author Molongui

    (@molongui)

    Hi @pidev,

    Sorry about the late reply!

    Using a comma in the author name will cause conflict if the separator (between author names) is also a comma. It is a limitation of how things are implemented right now. Anyway, we will check whether there is a way to go around it.

    Since version 4.6.18, you can remove the spaces automatically added around delimiters (that’s it, items between author names) by adding this line of code to your functions.php file (or wherever you think more appropriate):

    add_filter( 'authorship/byline_separator_autospace', '__return_false' );
    Thread Starter PIdev

    (@pidev)

    Thank you for reply

    1. It would be great if you could fix issue with delimiter (comma) in author names as this is most critical issue for us at the moment

    Hint: maybe to wrap author names in <span>Author, Name</span> and then on fronend ignore delimiter (comma) if it’s inside <span></span> element? Something like that could work?

    We are working on multiple news/publisher projects (around 10 projects at the moment and growing) where we would most likely use this plugin (and most likely we would need pro version as well on most of the projects)

    2. Thank you for fixing issue with extra space

    3. Team member recently asked one more question related to byline:

    -Is there option or would it be possible to setup different byline delimiter based on number of authors – for example
    -if there are only two authors -> then there should be “and”
    -if there are three or more authors, the last delimiter should be “, and” (with a serial comma before “and”)

    Thank you!

    Plugin Author Molongui

    (@molongui)

    Hi @pidev,

    I’m happy to let you know that we have been able to fix the “comma” issue. Now you can have a comma as author name separator with names that contain a comma. The fix will be included in upcoming 4.7.0 version.

    In order to be able to have different byline delimiters based on the number of authors to display, you need to integrate the provided template tags (see here) and use the 'authorship/byline_separator' and 'authorship/byline_last_separator' filters, which have the number of authors as second parameter.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Byline issue when there’s comma in author name’ is closed to new replies.