WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] how to put rss feed image on the left of the list_authors (15 posts)

  1. posthawk
    Member
    Posted 1 year ago #

    this is my code

    <?php wp_list_authors('feed_image=music.posthawk.com/feed-icon-14x14.png&orderby=name&exclude_admin=0&hide_empty=0'); ?>

    by default the rss feed image is on the right side of the author list
    i want it on the left, even though i have it first, it's still not first.

    i assume i have to edit the wp-includes/author-template.php but im not sure how.

    check out posthawk.com to see what i mean

    and while im here is there a way to get rid of the bullet points of the list or use the rss image logo as the bullet points

  2. Andrew Bartel
    Member
    Posted 1 year ago #

    Don't hack core, trust me.

    It doesn't look like wp_list_authors() has filters or actions you can use, I think you're stuck with the feed image on the right.

    If it's really important, you can write a plugin or an alternate function and use that to display the authors instead.

    I really like this plugin to display authors: http://wordpress.org/extend/plugins/author-avatars/

  3. posthawk
    Member
    Posted 1 year ago #

    i have the plugin already but this code is a lot simpler and does the same thing.

    but look at the right side of the page right under "about this topic" thats what i want but i cant understand the code by inspecting it

  4. Andrew Bartel
    Member
    Posted 1 year ago #

    I would really recommend copy pasting wp_list_authors into your functions.php, rename it something like posthawk_list_authors, call that, and then tackle learning how to edit it. If you have specific php questions that arise I'll be happy to answer them.

  5. posthawk
    Member
    Posted 1 year ago #

    i guess then my question is how to change the default order within the code

    like is it an array thing or an if/else order because those would be the 2 things in the code

  6. Andrew Bartel
    Member
    Posted 1 year ago #

    You really don't want to give it a crack at all? Track the $feed_image variable. All that's happening is that it's getting put after the name.

  7. posthawk
    Member
    Posted 1 year ago #

    heres a link to a picture of the original function.

    i cant figure out how to turn it into php. because i cant use list_authors anymore do i create a new function?

    http://posthawk.com/wp-content/upload/list-authors.jpg

  8. Andrew Bartel
    Member
    Posted 1 year ago #

    Yes, as I said in my previous post, copy paste the original WordPress function into your functions.php file, rename it, and then call your new function in place of the original.

  9. posthawk
    Member
    Posted 1 year ago #

    i get that.

    im not quite sure how to move the feed image above the name. i tried ajusting the ifs within the function but its not working right.

    like error not right

  10. Andrew Bartel
    Member
    Posted 1 year ago #

  11. posthawk
    Member
    Posted 1 year ago #

    nope. displays no feed image or link

  12. Andrew Bartel
    Member
    Posted 1 year ago #

    On line 84 of the pastebin, change $link = to $link .=

  13. posthawk
    Member
    Posted 1 year ago #

    thanks man for doing that for me. that was it. i dont know if i can thumb up you or not but i would

    but while you are here... how would i put a space between the two items
    (feed image and author name)? whould i do it in the function or the php?

  14. Andrew Bartel
    Member
    Posted 1 year ago #

    You're welcome, glad it's working.

    Go ahead and do it in the function.

    Change the beginning of line 84 in the pastebin: $link .= ' <a...

    For future reference, php is the language the function is written in. Happy coding!

  15. posthawk
    Member
    Posted 1 year ago #

    thanks

Topic Closed

This topic has been closed to new replies.

About this Topic