Integrating with WP-Types/Custom Fields
-
I’m struggling to integrate this lightbox with WP-Types. I’m able to display a text link, which opens the image in the lightbox, but can’t for the life of me get the IMAGE to display and link to the larger image.
This is the WP-Type code I’m using to display the image, and wrap the image in the link to the larger image:
<a href="<?php echo ($image1);?>"> <?php echo types_render_field( "image-1", array( "height" => "300", "proportional" => "true", "class" => "secondary-image" ) ); ?></a>
I put that in the slb_activate code:
<?php $content = "<a href='$image1'> <?php echo types_render_field( 'image-1', array( 'height' => '300', 'proportional' => 'true', 'class' => 'secondary-image' ) ); ?></a>";?> <?php if ( function_exists('slb_activate') ) ?> <?php $content = slb_activate($content); ?> <?php echo $content; ?>
It links to the image, in the lightbox just fine.
I tried removing all of that information in the array, and JUST including the WP-Types code for the image:
<?php $content = "<a href='$image1'> <?php echo types_render_field( 'image-1'); ?></a>";?> <?php if ( function_exists('slb_activate') ) ?> <?php $content = slb_activate($content); ?> <?php echo $content; ?>
And nothing shows up at ALL. So I need some way to put the WP-Types code through the slb_activate code intact, to display the image.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Integrating with WP-Types/Custom Fields’ is closed to new replies.