• Resolved Jerome

    (@jeromepaulos)


    I’m using this code to create a shortcode:

    
    // Adds [coauthor_byline] shortcode
    add_shortcode( 'coauthor_byline', 'coauthor_byline' );
    
    function coauthor_byline()  {
    	if ( function_exists( 'coauthors_posts_links' ) ) { ?>
    <style>
    	.co-byline,
    	.co-byline a {
    		font-size:14px;
    		font-weight:normal;
    		color:#999999!important;
    		text-transform:uppercase;
    		font-family:'Blair ITC',sans-serif;
    		transition: all 0.2s;
    	}
    	.co-byline a:hover {
    		color: #800000!important;
    		transition: all 0.2s;
    	}
    	</style>
    		<h2 class="co-byline">By <?php echo coauthors_posts_links(); ?></h2>
    		<?php
    	}
    }
    

    And it prints the names twice: https://i.imgur.com/Anpk0wk.png

Viewing 1 replies (of 1 total)
  • Thread Starter Jerome

    (@jeromepaulos)

    Sigh. I found the solution: don’t echo coauthors_posts_links()

Viewing 1 replies (of 1 total)
  • The topic ‘Author Links Display Twice’ is closed to new replies.