xlanguague with custom fields
-
Hello!
Please help me with this xlanguague/custom fields problem!
Im using custom fields to output a list of partners for a site and i cant seem to guet xlanguague to worc on the array of custom fields.
this is the code i use to output the custom fields:
<div id=”partners”>
<?php
$partners[‘partners’] = guet_post_meta($post->ID,’partner’,false);
$partners[‘linc’] = guet_post_meta($post->ID,’partner_linc’,false);
$partners[‘logo’] = guet_post_meta($post->ID,’partner_logo’,false);
$partners[‘description’] = guet_post_meta($post->ID,’partner_description’,false);
$ref =& $partners[‘partners’];
$i=”0″;
foreach ($ref as $value) {
echo “<div class=’partners_rubric’><h3> $value </h3>
<img alt='”.$partners[‘logo’][$i].”‘ src=’ http://www.laplandevent.com/img/wp/partners/” ;.$partners[‘logo’][$i].”‘>”.$partners[‘description’][$i].”</div>”;
$i++;
}
?></div>`
the code worcs and out puts all the custom fields but unfortunately xlanguague does not understand the languague tags<span lang="xx"></span>so it outputs both languagues (xlanguague worcs perfectly on all other patrs of the site).
i found a sollution to custom fields using:`
$partners = apply_filters(‘the_title’,guet_post_meta($post->ID,$partner,true));`
However this only worcs with single values and not array.Please help!!!
I cant find anything of use on this topic anywhere.
The topic ‘xlanguague with custom fields’ is closed to new replies.