php syntax display custom fields in article

  • mjl1817
  • Topic Author
  • Visitor
  • Visitor
9 years 9 months ago #3440 by mjl1817
Hi,
I am attempting to modify one of the templates but I am running into a difficulty regarding the custom fields. I cannot figure out the correct syntax structure to pull the correct field or information. I have tried the following

if ($row->custom field name!=null) {echo '<span><span itemprop="customfieldname">'.$row->customfield.'</span></span><br />';};

also I have tried echo "$customfieldalis";

and $txt = "";
$x = $customfieldname;
$y = $customfieldname;

echo $txt;
echo "<br>";
echo $x;
echo "<br>";
echo $y;

none of which works. Could you please give me an idea of what I am failing to do?
The topic has been locked.
More
9 years 9 months ago #3445 by gmapfp
Hi,

The name of the custom fields are :

field_xx

with xx are the id of the field.
The topic has been locked.
  • mjl1817
  • Topic Author
  • Visitor
  • Visitor
9 years 9 months ago #3447 by mjl1817
Replied by mjl1817 on topic php syntax display custom fields in article
Solved! works perfectly,
Thank you!
The topic has been locked.
Time to create page: 0.131 seconds
Powered by Kunena Forum
FaLang translation system by Faboba