Support » Plugin: Co-Authors Plus » Adding coauthors to HotWP theme

  • Hello, i’d like to add coauthors tags to HotWP theme. I haven’t found the tags in functions.php but i found them in postmeta.php
    The code is below but i haven’t figured out how to add it in there. Could anyone please help me? Thanks!

    This is the original code:

    if ( ! function_exists( 'hotwp_post_tags' ) ) :
    
    /**
    
     * Prints HTML with meta information for the tags.
    
     */
    
    function hotwp_post_tags() {
    
        if ( 'post' == get_post_type() ) {
    
            /* translators: used between list items, there is a space after the comma */
    
            $tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'hotwp' ) );
    
            if ( $tags_list ) {
    
                /* translators: 1: list of tags. */
    
                printf( '<span class="hotwp-tags-links"><i class="fa fa-tags" aria-hidden="true"></i> ' . esc_html__( 'Tagged %1$s', 'hotwp' ) . '</span>', $tags_list ); // WPCS: XSS OK.
    
            }
    
        }
    
    }
    
    endif;
    
    if ( ! function_exists( 'hotwp_style_9_cats' ) ) :
    
    function hotwp_style_9_cats() {
    
        if ( 'post' == get_post_type() ) {
    
            /* translators: used between list items, there is a space */
    
            $categories_list = get_the_category_list( esc_html__( '&nbsp;', 'hotwp' ) );
    
            if ( $categories_list ) {
    
                /* translators: 1: list of categories. */
    
                printf( '<div class="hotwp-fp09-post-categories">' . __( '<span class="screen-reader-text">Posted in </span>%1$s', 'hotwp' ) . '</div>', $categories_list ); // WPCS: XSS OK.
    
            }
    
        }
    
    }
    
    endif;
    
    if ( ! function_exists( 'hotwp_style_9_postmeta' ) ) :
    
    function hotwp_style_9_postmeta() { ?>
    
        <?php if ( !(hotwp_get_option('hide_post_author_home')) || !(hotwp_get_option('hide_posted_date_home')) || !(hotwp_get_option('hide_comments_link_home')) ) { ?>
    
        <div class="hotwp-fp09-post-footer">
    
        <?php if ( !(hotwp_get_option('hide_post_author_home')) ) { ?><span class="hotwp-fp09-post-author hotwp-fp09-post-meta"><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>"><?php echo esc_html( get_the_author() ); ?></a></span><?php } ?>
    
        <?php if ( !(hotwp_get_option('hide_posted_date_home')) ) { ?><span class="hotwp-fp09-post-date hotwp-fp09-post-meta"><?php echo get_the_date(); ?></span><?php } ?>
    
        <?php if ( !(hotwp_get_option('hide_comments_link_home')) ) { ?><?php if ( comments_open() ) { ?>
    
        <span class="hotwp-fp09-post-comment hotwp-fp09-post-meta"><?php comments_popup_link( esc_attr__( 'Leave a comment', 'hotwp' ), esc_attr__( '1 Comment', 'hotwp' ), esc_attr__( '% Comments', 'hotwp' ) ); ?></span>
    
        <?php } ?><?php } ?>
    
        </div>
    
        <?php } ?>
    
    <?php }
    
    endif;
    
    if ( ! function_exists( 'hotwp_style_5_cats' ) ) :
    
    function hotwp_style_5_cats() {
    
        if ( 'post' == get_post_type() ) {
    
            /* translators: used between list items, there is a space */
    
            $categories_list = get_the_category_list( esc_html__( '&nbsp;', 'hotwp' ) );
    
            if ( $categories_list ) {
    
                /* translators: 1: list of categories. */
    
                printf( '<div class="hotwp-fp05-post-categories">' . __( '<span class="screen-reader-text">Posted in </span>%1$s', 'hotwp' ) . '</div>', $categories_list ); // WPCS: XSS OK.
    
            }
    
        }
    
    }
    
    endif;
    
    if ( ! function_exists( 'hotwp_style_5_postmeta' ) ) :
    
    function hotwp_style_5_postmeta() { ?>
    
        <?php if ( !(hotwp_get_option('hide_post_author_home')) || !(hotwp_get_option('hide_posted_date_home')) || !(hotwp_get_option('hide_comments_link_home')) ) { ?>
    
        <div class="hotwp-fp05-post-footer">
    
        <?php if ( !(hotwp_get_option('hide_post_author_home')) ) { ?><span class="hotwp-fp05-post-author hotwp-fp05-post-meta"><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>"><?php echo esc_html( get_the_author() ); ?></a></span><?php } ?>
    
        <?php if ( !(hotwp_get_option('hide_posted_date_home')) ) { ?><span class="hotwp-fp05-post-date hotwp-fp05-post-meta"><?php echo get_the_date(); ?></span><?php } ?>
    
        <?php if ( !(hotwp_get_option('hide_comments_link_home')) ) { ?><?php if ( comments_open() ) { ?>
    
        <span class="hotwp-fp05-post-comment hotwp-fp05-post-meta"><?php comments_popup_link( esc_attr__( 'Leave a comment', 'hotwp' ), esc_attr__( '1 Comment', 'hotwp' ), esc_attr__( '% Comments', 'hotwp' ) ); ?></span>
    
        <?php } ?><?php } ?>
    
        </div>
    
        <?php } ?>
    
    <?php }
    
    endif;
    
    if ( ! function_exists( 'hotwp_single_cats' ) ) :
    
    function hotwp_single_cats() {
    
        if ( 'post' == get_post_type() ) {
    
            /* translators: used between list items, there is a space */
    
            $categories_list = get_the_category_list( esc_html__( ', ', 'hotwp' ) );
    
            if ( $categories_list ) {
    
                /* translators: 1: list of categories. */
    
                printf( '<div class="hotwp-entry-meta-single hotwp-entry-meta-single-top"><span class="hotwp-entry-meta-single-cats"><i class="fa fa-folder-open-o"></i>&nbsp;' . __( '<span class="screen-reader-text">Posted in </span>%1$s', 'hotwp' ) . '</span></div>', $categories_list ); // WPCS: XSS OK.
    
            }
    
        }
    
    }
    
    endif;
    
    if ( ! function_exists( 'hotwp_single_postmeta' ) ) :
    
    function hotwp_single_postmeta() { ?>
    
        <?php if ( !(hotwp_get_option('hide_post_author')) || !(hotwp_get_option('hide_posted_date')) || !(hotwp_get_option('hide_comments_link')) || !(hotwp_get_option('hide_post_edit')) ) { ?>
    
        <div class="hotwp-entry-meta-single">
    
        <?php if ( !(hotwp_get_option('hide_post_author')) ) { ?><span class="hotwp-entry-meta-single-author"><i class="fa fa-user-circle-o"></i>&nbsp;<span class="author vcard" itemscope="itemscope" itemtype="http://schema.org/Person" itemprop="author"><a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>"><?php echo esc_html( get_the_author() ); ?></a></span></span><?php } ?>
    
        <?php if ( !(hotwp_get_option('hide_posted_date')) ) { ?><span class="hotwp-entry-meta-single-date"><i class="fa fa-clock-o"></i>&nbsp;<?php echo get_the_date(); ?></span><?php } ?>
    
        <?php if ( !(hotwp_get_option('hide_comments_link')) ) { ?><?php if ( comments_open() ) { ?>
    
        <span class="hotwp-entry-meta-single-comments"><i class="fa fa-comments-o"></i>&nbsp;<?php comments_popup_link( esc_attr__( 'Leave a comment', 'hotwp' ), esc_attr__( '1 Comment', 'hotwp' ), esc_attr__( '% Comments', 'hotwp' ) ); ?></span>
    
        <?php } ?><?php } ?>
    
        <?php if ( !(hotwp_get_option('hide_post_edit')) ) { ?><?php edit_post_link( esc_html__( 'Edit', 'hotwp' ), '<span class="edit-link">&nbsp;&nbsp;<i class="fa fa-pencil" aria-hidden="true"></i> ', '</span>' ); ?><?php } ?>
    
        </div>
    
        <?php } ?>
    
    <?php }
    
    endif;
  • The topic ‘Adding coauthors to HotWP theme’ is closed to new replies.