2012-08-08, 03:38:41
soy Wrote:Hi! I want to appear a different slider on every page, so I thought, that its the easiest way to include i18N custom fields, with one field "sliderid". So I create the galleries, and on every page I can type the gallery I want to show and custom fields gives this to my template file with
<?php get_custom_field('sliderid'); ?>
So I do need to implement this in the
<?php get_i18n_gallery_header('slider'); ?>
and
<?php get_i18n_gallery(' '); ?>
part, but I have no idea how.
<?php get_i18n_gallery('<?php get_custom_field('sliderid'); ?>'); ?>
does not work, does it?
Best regards, Soy.
- Use return_custom_field, as get_custom_field will output the field content on the page.
- You are already in PHP code, so <?php is contraproductive
- 's are string delimiters, you must not use them here
Code:
<?php get_i18n_gallery_header(return_custom_field('sliderid')); ?>
...
<?php get_i18n_gallery(return_custom_field('sliderid')); ?>