Created
September 11, 2020 14:50
-
-
Save axxe16/8d2dc5093517756e8682387b4ca62583 to your computer and use it in GitHub Desktop.
Recuperare campi ACF su immagini e allegati con WPML attivo #wpml #acf #attachment #immagini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if( ICL_LANGUAGE_CODE == 'it' ) { | |
$link = get_field('link_ita', apply_filters( 'wpml_object_id', $image['ID'], 'attachment', TRUE, 'it' )); | |
} elseif( ICL_LANGUAGE_CODE == 'en' ) { | |
$link = get_field('link_en', apply_filters( 'wpml_object_id', $image['ID'], 'attachment', TRUE, 'en' )); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment