dejank
Forum Replies Created
-
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] translating captionsHi, solution for 2) and 3) :
no need to change code, as in 1). you only need to publish image in: Falang > Translate Posts > (search image by filename) > Publish
Note: you also put translation at the same place, no need to search for the image in Media.
Thank you Stephane, you are the best!
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] translating captionsHello again,
My theme is custom, I made it from scratch.
Because of that i display captions in three ways:1. Captions on Featured image:
` <?php if ( has_post_thumbnail() ): ?>
<?php $caption = get_post(get_post_thumbnail_id())->post_excerpt;
endif;?><?php echo $caption ?>`
2. Captions on images uploaded via ACF:
` <?php // ACF IMAGE (ID) – MAKE SURE FIELD IS SET TO ‘Image ID’
$img_acf = get_field(‘home-whw-img’);
$img_acf_caption = get_the_excerpt( $img_acf ); ?><?php if( $img_acf )
echo $img_acf_caption; ?>`3. Captions on images uploaded via plugin ‘ACF Photo Gallery Field’ (note that this is plugin for ACF, not actually ACF) :
` <?php $images = acf_photo_gallery(‘homegallery’, 472);
if (count($images)):
foreach ($images as $image):
$id = $image[‘id’];
$title = $image[‘title’];
$full_image_url = $image[‘full_image_url’];
$full_image_url = acf_photo_gallery_resize_image($full_image_url,
1600, 900); ?><?php echo wp_get_attachment_caption( $id ); ?> `
Note: all images is uploaded from Media with both Default and English captions entered. None of three different ways works on front-end
sending screenshots via e-mail
thank you
Dejan- This reply was modified 3 years, 10 months ago by dejank.
Hello
here is the simple case:
1. You have two Pages – ‘Home’ and ‘O nama’
2. Home page have ACF field (wysiwyg) called ‘home-galerija-nova-txt’
3. O nama page have ACF field (wysiwyg) called ‘about-address’
4. When you open Translate page on ‘Home’ it displays ‘home-galerija-nova-txt’ as wysiwyg (this is expected), but it also displays ‘about-address’ as plain text field (not wysiwyg).
5. Same thing in the other direction, when you open Translate page on ‘O nama’ it displays ‘about-address’ as wysiwyg (this is expected), but it also displays ‘home-galerija-nova-txt’ as plain text field (not wysiwyg).I don’t know how to put images here so i’m sending you screenshots on e-mail. on real page there is more that one ACFs per page so don’t mind them on screenshots i send on email
In the frontend everything works normally
Thank you very much
Hi,
yes, the problem is only on homepage with the slug turned off. when slug is set on homepage language switch works normally. on other pages everything works with slug on and off
Thank you
Dejan