Forums

feedwordpress - adding author names to titles (4 posts)

  1. lisagloria
    Member
    Posted 5 months ago #

    i installed feedwordpress at http://artistauctions.net and it's working great. the plugin author says he uses the following code to get the authors' names into the post titles:

    <cite class="feed">from <?php the_author_posts_link()?><?php
    if (is_syndicated() and (get_the_author() !== get_syndication_source())):
        echo ' @ <a href="';  the_syndication_source_link(); echo '">';
        the_syndication_source();
        echo '</a>';
    endif; ?></cite>

    and that: "For example, here is the template code that I use (in a post context) to display both the author’s name and the original source of the post in the templates "

    where do i put that code???? help! i am not a strong programmer, please be kind. :-)

  2. crondeau
    Member
    Posted 5 months ago #

    I think that what you want to do is look for this line of code in your template:

    <h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>

    and change it to:

    <h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> <cite class="feed">from <?php the_author_posts_link()?><?php
    if (is_syndicated() and (get_the_author() !== get_syndication_source())):
        echo ' @ <a href="';  the_syndication_source_link(); echo '">';
        the_syndication_source();
        echo '</a>';
    endif; ?></cite></h1>
  3. lisagloria
    Member
    Posted 5 months ago #

    Thank you for respondin, that makes sense... But it doesn't work. Is there maybe a place i need to "turn on" get_the_author, get_syndication_source and the others?

  4. kesseret
    Member
    Posted 2 months ago #

    Not sure if it will help but I use Feedwordpress Attribution for this.
    http://projects.radgeek.com/add-attribution-feedwordpress/

    It gave me a quick and dirty way to add authors and other neat attributions. Good luck!

Reply

You must log in to post.

About this Topic