Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Insert code into theme WordPress

  • SOLVED

I'm using this theme http://wordpress.org/extend/themes/blaskan

and want to install the plug-in co-authors-plus. But you have to insert code in random points, and it isn't straight forward about which code at which points. Here are the instructions about how to insert code
http://wordpress.org/extend/plugins/co-authors-plus/other_notes/

and please don't ask me to just replace a whole file of code with the code you give me, because I have other code modification already...

Answers (3)

2012-08-06

Arnav Joy answers:

can you please explain which information you want to fetch from this plugin?


Arnav Joy comments:

this function can be used as replacement of the_author like

the_author() --> coauthors();

the_author_posts_link() --> coauthors_posts_links()

the_author_firstname(); --> coauthors_firstnames() // the_author_firstname() is depricated

and so on

see in the left side where the_author comes it is replaced with coauthors.

every coauthor function has plurals form also so it is better to use it in this way as mentioned in the plugin

if(function_exists('coauthors_posts_links'))
coauthors_posts_links();
else
the_author_posts_link();

let me know which field you want to fetch from the plugin and i will tell you how to do it.


stevenwilson comments:

I want it to return the user name as it does now. advancedkorean.com

1-3 people work on each article, so I would like it to display 'Written by name1, name2, name3" and not have any errors. The names should link to profiles as they do now.

2012-08-06

Navjot Singh answers:

If you just want to list all the authors in place of the single author being listed at the same place in the theme, just open your theme's loop.php and find this

<?php the_author_posts_link(); ?>

and replace it with

<?php if(function_exists('coauthors_posts_links')) coauthors_posts_links(); else the_author_posts_link(); ?>


stevenwilson comments:

This worked. Just trying to find the "give award" button again...

2012-08-06

Asad Iqbal answers:

I think you are talking about how do you see authors or co-authors automatically, Am I right?