-
AuthorPosts
-
November 21, 2014 at 1:49 am #354806
Hi, I need in my site generate dinamically the content. I have over 500 images of artwork.
http://artistandbeer.com/prueba
I have create a shortcode [hola].
This shortcode have the same HTML code generated by enfold for an image with on hover text and lightbox on click.I put the shortcode inside de “avia code block” of page.
The image works but the lightbox not.In the example the first image is generated by my shortcode dinamically (not works ligthbox).
The second image is generated by enfold statically (works ok).Can you help me?
Thanks so much!!
Xavier.
November 21, 2014 at 2:17 am #354814Hey Xavier!
Include this in your image generation script (after the images are generated):
jQuery("body").avia_activate_lightbox();
Cheers!
JosueNovember 21, 2014 at 2:53 pm #355178I Josue, I have add at last of code this code but not works.
/******* xavi *********/
function shortcodeimagen($params = array()) {
extract(shortcode_atts(array(‘nombre’ => ”,’id’ => ”), $params));
$salida = “<div itemtype=’https://schema.org/ImageObject’ itemscope=’itemscope’
class=’avia-image-container av-styling- noHover av-overlay-on-hover avia-builder-el-2 el_after_av_one_full avia-builder-el-last avia-align-center’>
<div class=’avia-image-container-inner’>
<div class=’av-image-caption-overlay’><div class=’av-image-caption-overlay-position’><div class=’av-image-caption-overlay-center’>
<p>MY SHORTCODE</p>
</div>
</div>
</div>
<img itemprop=’contentURL’ title=’artistandbeer-como-fabricar-un-arma-de-destruccion-masivajpg’ alt=’en artistandbeer también nos gusta hacer experimientos’
src=’http://artistandbeer.com/wp-content/uploads/2014/11/artistandbeer-como-fabricar-un-arma-de-destruccion-masivajpg.jpg’ class=’avia_image ‘>
</div>
</div>
<script type=’text/javascript’>
jQuery(‘body’).avia_activate_lightbox();
</script>”;return $salida;
}add_shortcode(‘imagen2’, ‘shortcodeimagen’);
November 24, 2014 at 4:17 pm #356908Hi!!, any solution for this?
Thanks so much!!
Xavier.
November 27, 2014 at 6:49 pm #359125Hi, any solution please?
Thanks so much!!
Xavier.
November 27, 2014 at 6:59 pm #359131Hey!
Your shortcode causes a JS error. Why do not use integrated one? The on the on the right on your example?
Cheers!
YigitNovember 27, 2014 at 7:36 pm #359149Hi Yigit, I try generate dinamically the data with information of custom table.
I have over 3000 images and I like generate a page with image x,y,z.
My shortcode is (in functions.php):
function shortcodeimagen($params = array()) {
extract(shortcode_atts(array(‘nombre’ => ”,’id’ => ”), $params));
$salida = “<div itemtype=’https://schema.org/ImageObject’ itemscope=’itemscope’
class=’avia-image-container av-styling- noHover av-overlay-on-hover avia-builder-el-2 el_after_av_one_full avia-builder-el-last avia-align-center’>
<div class=’avia-image-container-inner’>
<div class=’av-image-caption-overlay’><div class=’av-image-caption-overlay-position’><div class=’av-image-caption-overlay-center’>
<p>MY SHORTCODE</p>
</div>
</div>
</div>
<img itemprop=’contentURL’ title=’artistandbeer-como-fabricar-un-arma-de-destruccion-masivajpg’ alt=’en artistandbeer también nos gusta hacer experimientos’
src=’http://artistandbeer.com/wp-content/uploads/2014/11/artistandbeer-como-fabricar-un-arma-de-destruccion-masivajpg.jpg’ class=’avia_image ‘>
</div>
</div>
<script type=’text/javascript’>
jQuery(‘body’).avia_activate_lightbox();
</script>”;return $salida;
}And work ok but the click in image and lightbox not…
Xavier.
November 27, 2014 at 8:40 pm #359169Hi,
Try with this:
<script> (function($){ $(window).load(function() { $("body").avia_activate_lightbox(); }); })(jQuery); </script>
Regards,
JosueNovember 28, 2014 at 1:28 am #359317Sorry but not works….
in http://artistandbeer.com/prueba the image with “my shortcode” text not work with ligthbox ;__(
function shortcodeimagen($params = array()) {
extract(shortcode_atts(array(‘nombre’ => ”,’id’ => ”), $params));
$salida = “<div itemtype=’https://schema.org/ImageObject’ itemscope=’itemscope’
class=’avia-image-container av-styling- noHover av-overlay-on-hover avia-builder-el-2 el_after_av_one_full avia-builder-el-last avia-align-center’>
<div class=’avia-image-container-inner’>
<div class=’av-image-caption-overlay’><div class=’av-image-caption-overlay-position’><div class=’av-image-caption-overlay-center’>
<p>MY SHORTCODE</p>
</div>
</div>
</div>
<img itemprop=’contentURL’ title=’artistandbeer-como-fabricar-un-arma-de-destruccion-masivajpg’ alt=’en artistandbeer también nos gusta hacer experimientos’
src=’http://artistandbeer.com/wp-content/uploads/2014/11/artistandbeer-como-fabricar-un-arma-de-destruccion-masivajpg.jpg’ class=’avia_image ‘>
</div>
</div>
<script type=’text/javascript’> (function($){ $(window).load(function() { $(‘body’).avia_activate_lightbox(); }); })(jQuery); </script>”;return $salida;
}add_shortcode(‘imagen2’, ‘shortcodeimagen’);
November 28, 2014 at 2:06 am #359349November 28, 2014 at 5:28 pm #359670<iframe src=”http://pastebin.com/embed_iframe.php?i=smSmKfuA” style=”border:none;width:100%”></iframe>
November 28, 2014 at 7:06 pm #359776Hi!
Remove “lightbox-added” from your link in the code:
<a class='avia_image' href='http://artistandbeer.com/wp-content/uploads/2014/11/artistandbeer-como-fabricar-un-arma-de-destruccion-masivajpg.jpg'>
Regards,
JosueNovember 28, 2014 at 10:32 pm #359919hi josue,
in spanish, 5 estrellas no, es un soporte de 6 estrellas.
muchas gracias por vuestra ayuda!!
añado, como mejora en en el foro podriais añadir un check para cerrar nosotros directamente los topics cuabdo esten resueltos, adi os damos menos trabajo.
xavier.
November 28, 2014 at 11:25 pm #359950De nada Xavier, un gusto poder ayudado :)
-
AuthorPosts
- The topic ‘avia code block and shortcode with lightbox not works’ is closed to new replies.