-
AuthorPosts
-
April 8, 2015 at 3:26 am #425045
Good morning Guru’s
Am wondering which Enfold PHP theme file to use (and where, within the file, to place) the following ACF shortcode generator code?
*************
<?php
$image_ids = get_field(‘gallery’, false, false);
$shortcode = ‘
**************If successful the short codes would be used in a Single Image and a Gallery element to the post as per code below:
1 Single Image Enfold Code:
[av_image src='ACF single image code HERE' attachment='' attachment_size='featured_large' align='center' animation='no-animation' link='' target='' styling='' caption='' font_size='' appearance=''][/av_image]2. Enfold Gallery Code
[av_gallery ids='ACF Gallery image code HERE' style='thumbnails' preview_size='portfolio' crop_big_preview_thumbnail='avia-gallery-big-crop-thumb' thumb_size='shop_catalog' columns='3' imagelink='lightbox' lazyload='avia_lazyload']The other Possible ACF codes snipets to be used for image display??? :
4. Single image
<?php
$image = get_field(‘image’);
if( !empty($image) ): ?>
” alt=”<?php echo $image[‘alt’]; ?>” />
<?php endif; ?>AND
5. Gallery
<?php
$images = get_field(‘gallery’);
if( $images ): ?>-
<?php foreach( $images as $image ): ?>
-
“>
” alt=”<?php echo $image[‘alt’]; ?>” />
<p><?php echo $image[‘caption’]; ?></p>
<?php endforeach; ?>
<?php endif; ?>
***************************************
Once again not sure which file (eg Index.php or Single-portfolio.php)?
Many thanks in advance!
ChrisApril 8, 2015 at 5:49 pm #425477Hey fineart!
This looks pretty complex and I don’t think it’s going to be that easy to get working so it would have to be considered custom work.
To answer your question though, if your trying to create a new shortcode then it should probably go at the end of the functions.php file.
Cheers!
Elliott- This reply was modified 9 years, 8 months ago by Elliott.
April 20, 2015 at 1:03 am #431009Hi Guys
thanks for the response.Which theme file and where, would I place this code
***********
<?php
$blubb = ‘[gallery ids=”‘;
$images = get_field(‘acf-gallery’);
if( $images ):
$counter = 0;
foreach( $images as $image ):
if ( $counter > 0 ) {$blubb .= ‘,’;}
$blubb .= $image[‘id’];
$counter++;
endforeach;
endif;
$blubb .= ‘”]’;echo $blubb;
?>
**********In order to use this ENFOLD code to produce the groovy Enfold gallery
[av_gallery ids='[ACF SHORTCODE HERE]’ style=’thumbnails’ preview_size=’portfolio’ crop_big_preview_thumbnail=’avia-gallery-big-crop-thumb’ thumb_size=’shop_catalog’ columns=’3′ imagelink=’lightbox’ lazyload=’avia_lazyload’]
Fingers crossed and thanks in advance?
ChrisApril 20, 2015 at 9:03 pm #431597Hi!
I do not know. Also, I do not think it’s going to work like that. It would be best to hire a freelancer out to help you with this customization.
Regards,
ElliottApril 21, 2015 at 12:25 am #431679Hi Elliot
Do you have any names or suggestions as to where I could source a Freelancer with
1. Enfold
2. ACF Plugin and or
3. Formidable Pro PluginExpertise?
Regards
ChrisApril 21, 2015 at 8:27 pm #432341Hi!
I don’t think we have anyone available. I would try the plugin authors and then maybe codeable, http://kriesi.at/contact/customization.
Cheers!
Elliott -
“>
-
AuthorPosts
- You must be logged in to reply to this topic.