Co-Authors Plus
[resolved] Installing Plugin (4 posts)

  1. Flattergeist
    Posted 3 years ago #

    I'm sorry to ask such a dumb question; I'm not familiar with editing any codes, so I'm completely lost at the moment.

    I installed the plugin, but I have no idea where to put the code that was given in "Other Notes".
    I read through almost the whole forum, but I couldn't find an explanation that basic.

    "To use them, simply modify the code surrounding all instances of the_author*() to something like the following example:"
    I actually don't understand which file of my theme I have to modify. Is it functions.php?
    I tried to put the following code in a child-theme, but that didn't work.

    Please help me! :)


  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 3 years ago #

    Sorry you're confused. In order to use Co-Authors Plus, you'll need to replace uses of the_author*() template tags with use of coauthors*(). The former is the code in WordPress core used to print the author names, links to their archive pages, etc. The latter is how Co-Authors Plus prints the byline information.

    Where those are actually replaced is dependent on which theme you're using. Is your theme's source code publicly available?

  3. Flattergeist
    Posted 3 years ago #

    Oh, okay.

    I'm using Twenty Eleven, I just changed some parts of the layout but left the main structure of the code. My blog is on http://desillusion.tamtam-berlin.de. Which file of the theme do you need? I think the style.css file is available, but that won't help I guess?

  4. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 3 years ago #

    You'll want to add this function to your theme's functions.php:

    function twentyeleven_posted_on() {
    printf( __( '<span class="sep">Posted on </span><time class="entry-date" datetime="%3$s" pubdate>%4$s</time><span class="by-author"> <span class="sep"> by </span> %5$s</span>', 'twentyeleven' ),
    esc_url( get_permalink() ),
    esc_attr( get_the_time() ),
    esc_attr( get_the_date( 'c' ) ),
    esc_html( get_the_date() ),
    ( function_exists( 'coauthors_posts_links' ) ) ? coauthors_posts_links( null, null, null, null, false ) : get_the_author_link()

    If it's a child theme, it will override TwentyEleven's declared function that adds the post meta to the post.

    Hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Co-Authors Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic