WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
Migrating complex site (9 posts)

  1. Sheila
    Member
    Posted 2 years ago #

    I'm in the process of converting an old custom CMS site into WP. Many articles have two authors. Since an non-augmented WP install can only assign one author per article, the geek hired to bring the data over ended up with lots of extra authors listed. So if author A is the site owner and co-authors with B, C, D each of whom also have distinct articles, I now have all of them in there alone AND all of them in there with A, so A, B, AB, C, AC, D, AD, etc.

    I've added the Co-Authors Plus plug-in. Now I'm trying to go in and reassign each of the joint articles manually to the two separate authors so I can remove the combined authors entirely. The goal is to have a list of authors with no repeats. And to have the articles with co-authors display both author names in the by-line and in the post-article author's box.

    There appears to be no way to remove the initiating author after I've added the two distinct authors (so I add A and B and want to remove AB who was the original author). Is there a way to remove the original author once I've added other authors? I've looked in the post where the authors are listed and delete is not an option. If I try to delete the user entry entirely it asks me to reassign the article or delete it. It's already assigned to both authors and I don't want to delete it. Maybe I need to only assign it one author then delete the joint and tell it to assign to the second author? so complex!

    Also, while the article does display under both authors, it seems to only display one by-line and one author profile.

    I don't have anything useful for you to look at yet. I'm wondering if this is the best approach and what else I can do to simplify this and get it working correctly. I'm not a code jock so please take that into account.

    I'm also worried if I do all this manual work that I won't regret it later. What happens to the co-author assignments if that plug-in fails or is removed?

    Thanks,
    Sheila

    http://wordpress.org/extend/plugins/co-authors-plus/

  2. Sheila
    Member
    Posted 2 years ago #

    I'm still working on this. I see that if I deactivate the CoAuthors Plus plug-in I can then reassign the doubles to one of the two people, then when I reactivate the plug-in I can add the second person. So that's a little better. However it appears that only the first name displays in the byline. Is this just some code I'm responsible for on my end to get the byline and author boxes to display BOTH authors? Any pointers greatly appreciated.

  3. evandavidpaul
    Member
    Posted 2 years ago #

    1. you don't need to delete the plugin to remove the first author, you just can't "remove" the first author. You have to click on the first author's name and change it to another author. And this can only be done before the second author is added. So "remove down to one, then change the first"

    2. In your author's profile page there is a "display name" option that must be changed from first name to full name.

  4. Mohammad Jangda
    Member
    Plugin Author

    Posted 2 years ago #

    However it appears that only the first name displays in the byline. Is this just some code I'm responsible for on my end to get the byline and author boxes to display BOTH authors?

    Yes, you need to add the appropriate template tags to get both authors to display when viewing a post. See http://wordpress.org/extend/plugins/co-authors-plus/other_notes/

    You have to click on the first author's name and change it to another author. And this can only be done before the second author is added. So "remove down to one, then change the first"

    You should be able to change the first author without adding another one. If it's not working that way, then it's a bug.

  5. Sheila
    Member
    Posted 2 years ago #

    Thank you so much. I now have successfully cleaned up the mess I was given and separated all the co-joined authors into two separate authors who both display on the by line. The last little piece I'm trying to sort out is why when I put the code in the hook for the under title and I make it a div to be able to format it, it is not closing the div... it is making the entire page content bold instead of just the byline text bold. Here's a page example: http://wir.hoffmangraphics.com/interview-with-david-reich

    and this is the code I put in the hook:
    <div id="byline">Written on <?php the_date(); ?> by <?php return coauthors_posts_links()?>

    and my CSS:
    /* byline*/
    body.custom div#byline {font-size: 14px; color: #534791; font-weight: bold;}

    Is there something about the php code that is keeping the css from working correctly?

  6. Sheila
    Member
    Posted 2 years ago #

    OK, so no help with the above formatting...no worries. Now I have a bigger "fish to fry". I have Co-Authors working properly. I've just added a premium membership plug-in called DAP (Digital Access Pass). I've just discovered that while Co-Authors still work fine for unprotected pages and when logged in, there's a problem with the code in the hook when not logged in.

    You can go here: http://wir.hoffmangraphics.com/a-free-range-writer and see the error which basically is this....

    Written on by
    Notice: No post ID provided for CoAuthorsIterator constructor. Are you not in a loop or is $post not set? in /home/hoffman/public_html/wir/wp-content/plugins/co-authors-plus/template-tags.php on line 71
    , and

    As you can see it's trying to list the 2 authors but instead rendering an error. I'm putting the co-author code in a hook for before featured/single post content. This is what it is.
    Written on <?php the_date(); ?> by <?php return coauthors_posts_links()?>

    Any clues how I can work around this? I really need the Co-Authors AND I really need the membership protection too. My ass is grass if I can't make them play nice together.

    I hope someone can help.

  7. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    Hey there,
    Your Co-Authors Plus template tag should be something like:

    <?php coauthors_posts_links(); ?>

    Notice the dropped "return".

    If Co-Authors Plus works fine without the Digital Access Pass plugin, and breaks when you enable the latter, then it's likely a problem with the latter.

  8. Sheila
    Member
    Posted 2 years ago #

    Thanks for the quick response. I assume when you say "return" you mean the missing semi-colon? I'm obviously not a coder! I tried adding that as well as removing the word "return" but neither fixed the problem. I'll contact them but I'm not hopeful about their response. Thank you.

  9. Sheila
    Member
    Posted 2 years ago #

    OH...I see...you mean drop the WORD "return". I've now tried it with and without the word and also with and without the semicolon which you had and I did not. I've also gotten advice form Headway Themes (my framework) to try it in custom functions instead of in the Easy Hooks. So far nothing has fixed the issue. Can you see if their code needs tweaking that might work in functions?

    PHP:
    ---------
    function post_author_meta() {
    global $post ?>
    Written on <?php the_date(); ?> by <?php return coauthors_posts_links(); ?> <?php } add_action('headway_after_post_title','post_author_meta');
    ---------

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic