Hi @eberthtorres
Thank you for your enquiry.
The plugin has action hooks that you can use for the repeater template should you wish to add additional content. I recommend giving them ago.
See documentation on action hooks. https://autoloadnextpost.com/documentation/action-hooks/
Hope that helps.
regards,
Sébastien.
i have a function that change original wordpress gallery
add_shortcode( 'gallery', 'modified_gallery_shortcode' );
function modified_gallery_shortcode($attr) {
if(!empty($attr["normal"]) && $attr["normal"] == "true"){
$output = gallery_shortcode($attr);
} else {
$image_ids = explode(',', $attr['ids']);
$output = '';
$size = 'destacada'; // Forzar un tamano
foreach($image_ids as $attachment_id) {
$img_src = esc_url( wp_get_attachment_image_url( $attachment_id, $size ) );
$img_src_owl = esc_url( wp_get_attachment_image_url( $attachment_id, 'full' ) );
$img_srcset = esc_attr( wp_get_attachment_image_srcset( $attachment_id, $size ) );
$alt = esc_attr ( get_post_meta($attachment_id, '_wp_attachment_image_alt', true) );
$link = esc_attr ( get_post_meta($attachment_id, '_gallery_link_url', true) );
$the_attachment = get_post($attachment_id); // post
$caption = esc_attr ( $the_attachment->post_excerpt );
$img = "<img src='" . $img_src . "' srcset='" . $img_srcset . "' sizes='" . auto . "' alt='" . $alt . "'>";
$link = "<a href='" . $img_src_owl . "' class='galeria'>" . $img . "</a>";
$caption = "<figcaption>" . $caption . "</figcaption>";
$item = "<div class='item news-post image-post3'>" . $link . $caption . "</div>";
$output .= $item;
}
$output =
'<div class="carousel-box owl-wrapper gallery-post">'.
'<div class="title-section"><h3><span>Galería</span></h3></div>'.
'<div class="owl-carousel" data-num="3">'.
$output .
'</div>'.
'</div>' ;
}
return $output;
}
That does not work too, any idea?
As far as I know, the default WordPress gallery shortcode works fine with ALNP.
The problem was the owl js function
I solved this by using the “after a post has loaded” trigger
Thanks