gotgotf
Forum Replies Created
-
past this :
jQuery(document).ready(function(){wprssbind();
});
what is your url please for debug ?
OK juste past it for test :
jQuery(document).ready(function($){jQuery(document).removeClass(‘colorbox’);
wprssbind();
});
What is your Url please for debug ?
Past this in Callback :
if ( $(‘your-class’).length ) {
wprssbind(); // your function
}Are you in infinite scroll Options this ligne Callback after item Selector ?
Yes, what is your script that replaces my iframe for videos ?
Another exemple for callback your function whit FancyBox.
Ex.
function applyFancyBoxToImages(elements){
$(elements).each(function(){
$(this).find(‘img’).fancybox();
});
}$(elem).infinitescroll(options,applyFancyBoxToImages(arrayOfNewElems));
How do I pass additional arguments such as callbacks to the Infinite Scroll script?
Source/
https://github.com/paulirish/infinite-scroll/tree/master/wordpress-plugin
how To pass additional arguments to the Infinite Scroll script, add the following code to either your theme’s functions.php or to a stand-alone plugin file.function my_infinite_scroll_options_filter( $options ) {
$options[‘callback’] = ‘my_callback’;
$options[‘another_parameter’] = ‘another_value’;
return $options;
}add_filter( ‘infinite_scroll_js_options’, ‘my_infinite_scroll_options_filter’ );
I see it !
I see it !
In your infiniteScroll script, after success, put your script that replaces my iframe for videos.
Forum: Fixing WordPress
In reply to: Looking for a way to add my rating system in my pageAh, ok, il y a pas mal de solution pour faire cela.
C’est un plugin que tu veux ou une solution manuel ?Forum: Fixing WordPress
In reply to: JavascriptUse the TinyMCE Advanced plugin –
there is an admin page (Settings->TinyMCE Config) that let you add supported tags using the extended_valid_elements option.Forum: Fixing WordPress
In reply to: Looking for a way to add my rating system in my pageBonjour, un Fran?ais, c’est cool.
Il y a un tuto ici
https://code.tutsplus.com/articles/how-to-create-a-simple-post-rating-system-with-wordpress-and-jquery–wp-24474Forum: Fixing WordPress
In reply to: first image onlySOURCE :
https://wordpress.stackexchange.com/questions/60245/get-first-image-in-a-postfunction find_img_src($post) {
if (!$img = gpi_find_image_id($post->ID))
if ($img = preg_match_all(‘/<img.+src=[\'”]([^\'”]+)[\'”].*>/i’, $post->post_content, $matches))
$img = $matches[1][0];
if (is_int($img)) {
$img = wp_get_attachment_image_src($img);
$img = $img[0];
}
return $img;
}and
<?php while (have_posts()) : the_post(); ?>
<?php if ($img_src = find_img_src($post) : ?>
<img src=”<?php echo $img_src; ?>” />
<?php endif; ?>
<?php endwhile; ?>