Not able to add co-authors plugin for Magnitude theme in WordPress

I am using Magnitude theme for WordPress, and to use the Co-Authors plugin to support multiple authors, I followed this article. I changed two pieces of code in the file inc/template-function.php

Change #1

if (!function_exists(‘magnitude_archive_title’)) :
function magnitude_archive_title($title) {
if (is_category()) {
$title = single_cat_title(”, false);
} elseif (is_tag()) {
$title = single_tag_title(”, false);
} elseif (is_author()) {
$title = ‘<span class=”vcard”>’ . get_the_author() . ‘</span>’;
// changes start
if ( function_exists( ‘coauthors_posts_links’ ) )
$title = coauthors_posts_links( null, null, null, null, false );
// changes end
} elseif (is_post_type_archive()) {
$title = post_type_archive_title(”, false);
} elseif (is_tax()) {
$title = single_term_title(”, false);
}
return $title;
}
endif;

Change #2

if (!function_exists(‘magnitude_pagination_scripts_args’)):
function magnitude_pagination_scripts_args()
{
//Ajax load
$args[‘nonce’] = wp_create_nonce(‘magnitude-load-more-nonce’);
// some more code here
//Search
if (is_search()) {
$args[‘search’] = get_search_query();
}
//Author
if (is_author()) {
$args[‘author’] = get_the_author_meta(‘user_nicename’);
// changes start here
if ( function_exists( ‘coauthors_posts_links’ ) )
$title = coauthors_posts_links( null, null, null, null, false );
// changes end here
}
//Date archive
if (is_date()) {
$args[‘year’] = get_query_var(‘year’);
$args[‘month’] = get_query_var(‘monthnum’);
$args[‘day’] = get_query_var(‘day’);
}

// some more code

But these changes don’t lead to the addition of multiple authors on the posts.

I can assure that the co-authors plugin is installed, and that there are multiple authors for the posts as the plugin was working for the previous theme, but since I’ve changed the theme, I need to configure it again.

Read more here:: Not able to add co-authors plugin for Magnitude theme in WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *