How to insert likes in gallery Wordpress?

0 like 0 dislike
29 views
Good time of day. There is a plugin gallery plugin and the likes. The bottom line is that I took the plugin gallery and made it a slider (slider he wrote based on the owl carousel 2, needed the ability to create and redcity all the admin), as well the possibility to put the huskies through the second plug. Put code in slider, he began to rejoice in what works, not here that was. Plugin of likes determines the id of the gallery, takes him for the post and writes to a database, after digging, I found out that it specifically calculates $post->ID, I tried to upload the recording likes for $attachment->ID, but nothing too failed. I don't know what to do, I would be very very grateful if you help. here is the loop just in case

while ( $second_query->have_posts() ) { $second_query->the_post(); ?> <?php echo do_shortcode( get_the_content() );$images_id = get_post_meta( $post->ID '_gallery_images', true ); $posts = get_posts( array( "showposts" => -1, "what_to_show" => "posts", "post_status" => "inherit", "post_type" => "attachment", "orderby" => $gllr_options['order_by'], "order" => $gllr_options['order'], "post_mime_type" => "image/jpeg,image/gif,image/jpg,image/png", 'post__in' => explode( ',', $images_id ), 'meta_key' => '_gallery_order_' . $post->ID ) ); /*beginning*/ if ( 0 < count( $posts ) ) { $count_image_block = 0; ?> <?php foreach ( $posts as $attachment ) {$image_attributes\t\t= \twp_get_attachment_image_src( $attachment->ID, $gllr_options['image_size_photo'] ); $image_attributes_large = wp_get_attachment_image_src( $attachment->ID, 'large' ); $image_attributes_full = wp_get_attachment_image_src( $attachment->ID, 'full' ); $url_for_link = get_post_meta( $attachment->ID, 'gllr_link_url', true ); $image_text = get_post_meta( $attachment->ID, 'gllr_image_text', true ); $image_alt_tag = get_post_meta( $attachment->ID, 'gllr_image_alt_tag', true ); if ( $count_image_block % $gllr_options['custom_image_row_count'] == 0 ) { ?> <?php } ?><?php if ( ! empty( $url_for_link ) ) { ?>
image style="<?php if ( $width ) echo 'width:' . $width . 'px;'; if ( $height ) echo 'height:' . $height . 'px;'; echo $border; ?>"alt="<?php echo $image_alt_tag; ?>"title="<?php echo $image_text; ?>"src="<?php echo $image_attributes[0]; ?>"/> <?php } else {if( ! $gllr_options['enable_image_opening'] == 1 ) { ?>
\t<?php echo $image_alt_tag; ?>
<?php echo $image_text; ?>
<?php if(function_exists('wp_ulike')) wp_ulike('get'); ?>
<?php } else { ?><?php echo $image_alt_tag; ?><?php }} ?><?php if ( $count_image_block%$gllr_options['custom_image_row_count'] == $gllr_options['custom_image_row_count']-1 ) { ?><?php }$count_image_block++;}if ( 0 < $count_image_block && $count_image_block%$gllr_options['custom_image_row_count'] != 0 ) { ?><?php } ?>$(document).ready(function() {$(".slide-two-<? echo $post->ID;?>").owlCarousel({loop:true, //Зацикливаем слайдерmargin:0, //Отступ от картино если выводите больше 1nav:true,rows: true,autoplayHoverPause:true,navText : ["
","
"],autoplay:true, //Автозапуск слайдераsmartSpeed:600, //Время движения слайдаautoplayTimeout:3000, //Время смены слайдаresponsive:{ //Адаптация в зависимости от разрешения экрана0:{items:4},600:{items:6},1000:{items:8}}});});<?php }</code>


this code prints the huskies
<?php  if(function_exists('wp_ulike')) wp_ulike('get'); ?>


but in fact there is apparently processing what id write codeshare

P. S is it possible to make still so that the photo gallery was perceived to WP ULike or as posts, but as comments? for me pictures have 210 id etc when the site will be a 210 post, there's naturally a big tank. Comments and likes I still don't use.
by | 29 views

1 Answer

0 like 0 dislike
Absolutely welcome.
jazzman7may need brought this idea to its logical conclusion - started the huskies in the gallery ? And all this is somewhere you can contemplate ? Also consider WP ULike, not for posts, but for images and galleries.
by

Related questions

0 like 0 dislike
1 answer
asked Aug 18, 2019 by selftrips
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
33,947 users