This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Tagged: 

Co Author Plus plugin not playing well with JS 2.0

Viewing 11 replies - 1 through 11 (of 11 total)
  • Author
    Replies
  • #22157
    Jason Bobich
    Keymaster

    Hi Angela,

    Add an issue on the Github repo and I can take a look at it after the initial 2.0 release… it’ll just get buried if it’s only here in the forums, and I don’t really have space to worry about it before trying to get this 2.0 release out.

    https://github.com/themeblvd/jumpstart/issues (make sure you’re logged into Github with your username that has access)

    #22271
    askwpgirl
    Participant

    I will add this to github. However, I have an immediate need with a client whose site we are going to go live with soon. I was able to get the co-authors code to work with JS 1.2.x without any issues.

    This is the function I am using:

    remove_action('themeblvd_blog_meta','themeblvd_blog_meta_default');
    add_action('themeblvd_blog_meta','schacht_blog_meta_default');
    
    
    function schacht_blog_meta_default() {
    		
    	// Setup text strings so their run through the 
    	// framework's frontend localization filter.
    	$text = array(
    		'comment' => themeblvd_get_local( 'comment' ),
    		'comments' => themeblvd_get_local( 'comments' ),
    		'no_comments' => themeblvd_get_local( 'no_comments' ),
    	);
    	
    	?>
    	<div class="entry-meta">
    		<time class="entry-date" datetime="<?php the_time('c'); ?>" pubdate><i class="fa fa-calendar"></i> <?php the_time( 'F Y' ); ?></time>
    		<span class="sep"> / </span>
    		<span class="author vcard"><i class="fa fa-user"></i> " title="<?php echo sprintf( esc_attr__( 'View all posts by %s', '' ), get_the_author() ); ?>" rel="author">
    		<?php if ( function_exists( 'coauthors_posts_links' ) ) {
    				coauthors_posts_links();
    				} else {
    				the_author_posts_link();
    		} ?>
    		</span>
    		<span class="sep"> / </span>
            <span class="category"><i class="fa fa-bars"></i>  <?php the_category(', '); ?></span>
    			</div><!-- .entry-meta -->		
    	<?php
    }
    

    Here’s how this code works in JS 1.2.x

    http://www.betternutrition.com/category/healthy-dish/ – archive – note authors
    http://www.betternutrition.com/dreamy-summer-dessert/ – single post – note authors

    Here’s how the code works (or doesn’t in JS 2.0):

    http://sig-sandbox.com/schacht/category/spinning-techniques/ – archive list – works
    http://sig-sandbox.com/schacht/fish-are-jumpin-and-cotton-is-high/ – single post – doesn’t show coauthors

    The single content.php file is using the same meta function as the archive list — but for some reason only gets the WP user, not the co-authors. Sorry to bug you with this.

    #22273
    Jason Bobich
    Keymaster

    The code I’m seeing here in the forum doesn’t quite make sense. I’m not sure if you’re writing it incorrectly, or my forum is doing something to it. Try pasting it somewhere else and linking me to it so I can see it more clearly.

    http://pastie.org

    #22274
    Jason Bobich
    Keymaster

    Yeah, looking at your implementation in JS 1.2, even though it appears to work, you haven’t done it correctly there, either. You’ve got links inside of links. I have a feeling this is just something to do with some errors in the way you’re implementing the code.

    So start with shooting me a pastie so I know exactly what you have, and will see if I can re-write it to be more logical. With how this is implemented, it doesn’t really make sense (just from my initial thinking, anyway) that Jump Start would be effecting how the coauthors_posts_links() tag works because the theme doesn’t do anything with filtering anything the plugin is doing with WordPress authors.

    #22275
    askwpgirl
    Participant

    Yes, that was all from the plugin authors. It was taken over by automattic, and there has been little if any support for it since then. Here’s the documentation they send people to:

    https://vip.wordpress.com/documentation/incorporate-co-authors-plus-template-tags-into-your-theme/

    And, this is what I have in the function for the meta data which is just substituting the JS author with the code from above:

    http://pastie.org/10265018

    #22276
    askwpgirl
    Participant

    I thought it would be better to redefine the author variable, but then, well, I reach the level of my incompetence with PHP.

    #22277
    Jason Bobich
    Keymaster

    Ok, give this a try:

    http://pastie.org/10265033

    #22278
    askwpgirl
    Participant

    Nope. Same result. Works on archives but not on single posts.

    #22279
    askwpgirl
    Participant

    I had tried much simpler function, too, when I was testing and just couldn’t get anything to work on the single post. I even removed the IF statement and simply put the coauthors_posts_links tag, and it still got the WP user. I added the words “YO DUDE” to the function just to make sure the function was what was being used on the single post. I tried ONLY listing the coauthors, and eliminated all the other stuff in the function, and it still didn’t work. I did try to eliminate any and all extraneous stuff just to try to get something to work in the most rudimentary way. But always with same result: coauthors on archives and wp users on single post, which is so bizarre.

    #22280
    Jason Bobich
    Keymaster

    Hey can I try a few things with that function through your WP admin’s theme editor? And also look more at the setup of the child theme? If so, can you send me the info on Twitter?

    #22281
    Jason Bobich
    Keymaster

    I think there’s some kind of issue with the setup of your child theme and that code actually getting included when you think it’s getting included. And that’s why I wanted to checkout your entire child theme.

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.