Support » Plugin: Co-Authors Plus » [Plugin: Co-Authors Plus] Installing Plugin

  • Resolved Flattergeist

    (@flattergeist)


    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! 🙂

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    Hand Built

    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?

    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?

    Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    Hand Built

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Co-Authors Plus] Installing Plugin’ is closed to new replies.