Conversation
supportI’d really like to fix the error this plugin has when it renders. I always receive: fifopost_SetFadeLinks’ is undefined in fade-in-fade-out-post-title.js line 36 Can anyone point me in the right direction? http://wordpress.org/plugins/fade-in-fade-out-post-title/
Here it is, the plugin will break; causing a bunch of .js errors and breaking the fade-link and fade-links (inline .js) if and when you use special characters or html entities in the post titles. To fix this I altered lines in the fade-in-fade-out-post-title.php, lines 70-88, with changes made to 77 and 78: if ( ! empty($sSql) ) { $count = 0; foreach ( $sSql as $sSql ) { $title = esc_html( $sSql->post_title ); //$title = $sSql->post_title; $link = get_permalink(esc_html ($sSql->ID)); $fifopost_arr = $fifopost_arr . "fifopost_Links[$count] = '$link';fifopost_Titles[$count] = '$title'; "; if($count == 0) { $first_t = $title; $first_l = $link; } $count = $count + 1; } } wp_reset_query(); Would be great to see you update the plugin to allow special characters in the post titles, thanks for getting us here.
This still did not fix all the errors, I was getting them on pages where the plugin did not render, to fix this (and because I am only ever going to use this plugin on the home page I added && is_front_page to the script enqueue …
Here it is, the plugin will break; causing a bunch of .js errors and breaking the fade-link and fade-links (inline .js) if and when you use special characters or html entities in the post titles. To fix this I altered lines in the fade-in-fade-out-post-title.php, lines 70-88, with changes made to 77 and 78: if ( ! empty($sSql) ) { $count = 0; foreach ( $sSql as $sSql ) { $title = esc_html( $sSql->post_title ); //$title = $sSql->post_title; $link = get_permalink(esc_html ($sSql->ID)); $fifopost_arr = $fifopost_arr . "fifopost_Links[$count] = '$link';fifopost_Titles[$count] = '$title'; "; if($count == 0) { $first_t = $title; $first_l = $link; } $count = $count + 1; } } wp_reset_query(); Would be great to see you update the plugin to allow special characters in the post titles, thanks for getting us here.
This still did not fix all the errors, I was getting them on pages where the plugin did not render, to fix this (and because I am only ever going to use this plugin on the home page I added && is_front_page to the script enqueue …