ncpolicywatch
Forum Replies Created
-
Forum: Plugins
In reply to: [List category posts] lcp and coauthors plusI swapped out
if ( function_exists( 'coauthors' ) )
for
if ( get_the_terms($single -> ID,'author') )
because it was throwing an error for posts that do not have any coauthors.
Forum: Plugins
In reply to: [List category posts] lcp and coauthors plusTried a different solution. Kind of a roundabout way to do this…. but it seems to be working for the moment….
public function get_author_to_show($single){ if ($this->params['author'] == 'yes'): $lcp_userdata = get_userdata($single->post_author); $author_name = $lcp_userdata->display_name; if ( function_exists( 'coauthors' ) ) { global $coauthors_plus; $my_coauthor_links_array = array(); $my_coauthor_array = array(); $my_coauthor_terms = get_the_terms($single -> ID,$coauthors_plus->coauthor_taxonomy); foreach( $my_coauthor_terms as $my_coauthor ) { $my_coauthor_slug = preg_replace( '#^cap\-#', '', $my_coauthor->slug ); $my_post_author = get_user_by( 'slug', $my_coauthor_slug ); $my_coauthor_name = $my_post_author->first_name . ' ' . $my_post_author->last_name; $my_coauthor_link = get_author_posts_url($my_post_author->ID); $my_coauthor_name_link = "<a href=" . $my_coauthor_link . " title='" . $my_coauthor_name ."'>" . $my_coauthor_name . "</a>"; array_push($my_coauthor_links_array, $my_coauthor_name_link); array_push($my_coauthor_array, $my_coauthor_name); } $my_coauthor_links_comma_list= implode(', ',$my_coauthor_links_array); $my_last_coauthor_link = array_pop($my_coauthor_links_array); $my_coauthor_links_output= implode(', ',$my_coauthor_links_array); if($my_coauthor_links_output){ $my_coauthor_links_output .= ' and '; } $my_coauthor_links_output .= $my_last_coauthor_link; $my_coauthor_comma_list= implode(', ',$my_coauthor_array); $my_last_coauthor = array_pop($my_coauthor_array); $my_coauthor_output= implode(', ',$my_coauthor_array); if($my_coauthor_output){ $my_coauthor_output .= ' and '; } $my_coauthor_output .= $my_last_coauthor; } if($this->utils->lcp_not_empty('author_posts_link') && $this->params['author_posts_link'] == 'yes'){ if ( function_exists( 'coauthors' ) ) { return $my_coauthor_links_output; } else { $link = get_author_posts_url($lcp_userdata->ID); return "<a href=" . $link . " title='" . $author_name ."'>" . $author_name . "</a>"; } } else { if ( function_exists( 'coauthors' ) ) { return $my_coauthor_output; } else { return $author_name; } } else: return null; endif; }
Forum: Plugins
In reply to: [List category posts] lcp and coauthors plusWhoop, now that I’m looking at it, my solution didn’t work. It was showing the coauthors from another loop… Whomp whomp. =(
Forum: Plugins
In reply to: [List category posts] lcp and coauthors plusQuick edit, in my code, replace
coauthors_posts_links();
with
coauthors_posts_links(null, null, null, null, false);
The former echoes the links, so my code would both echo and return the text. The latter stops the echo and only returns.
Do the same with
coauthors(null, null, null, null, false);
Forum: Plugins
In reply to: [List category posts] lcp and coauthors plusHello, I am not sure if you are still looking for a solution. Here is what I came up with, whether or not it’s proper, I’m not sure.
Original:
public function get_author_to_show($single){ if ($this->params['author'] == 'yes'): $lcp_userdata = get_userdata($single->post_author); $author_name = $lcp_userdata->display_name; if($this->utils->lcp_not_empty('author_posts_link') && $this->params['author_posts_link'] == 'yes'){ $link = get_author_posts_url($lcp_userdata->ID); return "<a href=" . $link . " title='" . $author_name . "'>" . $author_name . "</a>"; } else { return $author_name; } else: return null; endif; }
My edit:
public function get_author_to_show($single){ if ($this->params['author'] == 'yes'): $lcp_userdata = get_userdata($single->post_author); $author_name = $lcp_userdata->display_name; if($this->utils->lcp_not_empty('author_posts_link') && $this->params['author_posts_link'] == 'yes'){ if ( function_exists( 'coauthors_posts_links' ) ) { $coauthors =' '.coauthors_posts_links(); return $coauthors; } else { $link = get_author_posts_url($lcp_userdata->ID); return "<a href=" . $link . " title='" . $author_name ."'>" . $author_name . "</a>"; } } else { if ( function_exists( 'coauthors' ) ) { $coauthors =' '.coauthors(); return $coauthors; } else { return $author_name; } } else: return null; endif; }
Forum: Fixing WordPress
In reply to: Read More "Visual Tag (—-) On post page are missingForum: Fixing WordPress
In reply to: 4.0 "Read More" tag is invisible on visual editorHappened to us too. Figured it out to be a javascript thing. We were using google libraries for AJAX CDN, WP probably upgraded libraries to one not covered in google libraries yet. We disabled Use Google Libraries and the dotted line returned. I don’t know if you are using something similar but look into that!
Forum: Plugins
In reply to: [YARPP - Yet Another Related Posts Plugin] related posts showing in headerOh ok, thanks. I actually might have found the “culprit,” the Advanced Excerpt plugin. I deactivated it and it seems to have resolved the issue. Thanks again!
Yes sure, we are using the list view and the theme we are using is Hooray by Bdayh: https://themeforest.net/item/hooray-premium-wordpress-blog-theme/6449280
Forum: Plugins
In reply to: [WordPress Charts] chartjs.org?Nevermind, firewall issue on my end. oops.
Forum: Plugins
In reply to: [Video Thumbnails] Fatal error on activationThanks for the swift response and update!! Updated to this version and activated without error!
Thanks!
Forum: Plugins
In reply to: [Video Thumbnails] Fatal error on activationIt’s quite a long list… but:
Audio player
Blubrry PowerPress
Category Posts Widget
Event Espresso
Exec-PHP
Executable PHP Widget
External Videos
Formidable
Google Calendar Events
jQuery Colorbox
Kimili Flash Embed
Promotion Slider
Recent Custom Posts
Redirection
Regenerate Thumbnails
Reveal IDs
ShareThis
Shortcode Exec PHP
Super Rss Reader
Tabbeed Widgets
TablePress
TouchCarousel
Twitter Widget Pro
Use Google Libraries
Video Thumbnails
Viper’s Video Quicktags
WP-Print
WP Super Cache
WPtouch Pro
Yet Another Related Posts PluginForum: Plugins
In reply to: [Video Thumbnails] Fatal error on activationI downgraded to 1.8.2 for now to get it working again… But a fix would be nice.
Forum: Plugins
In reply to: [Category Posts Widget] change post-title font sizeUse a custom css class.
https://ednailor.com/2011/01/24/adding-custom-css-classes-to-sidebar-widgets/
Forum: Plugins
In reply to: [Category Posts Widget] Switch date and titleOkies, here’s the pastebin link, “as per the Forum Rules”…