Hello Please help,
I’ve added this code to display custom field input for pdf file download on page layout.
this >> (i add this to enfold/includes/loop-page.php after line 31)
if( have_rows('upload_pdf_file') )
{
echo '<table border="0" cellpadding="10" cellspacing="0">';
while( have_rows('upload_pdf_file') ): the_row();
// vars
$file = get_sub_field('pdf_file');
$pdfcap = get_sub_field('pdf_title');
$url = $file['url'];
$title = $file['title'];
$caption = $file['caption'];
echo '<tr class="pdfbutton"><td width="70%">';
echo '<span>'.$pdfcap.'</span></td>';
if( $url )
{
echo '<td align="center"><a href="'.$url.'" title="'.$title.'" target="_blank">';
}
echo 'Download PDF';
if( $url )
{
echo '</a>';
}
echo '</td></tr>';
endwhile;
echo '</table>';
}
but it able to show only some page and some page just disappear even I put content to acf via backend already.
please help, I need this code above to show on every page.
Thanks so much!
Hi zmkstudio!
It seems thta you have content on the other page inside that is why it is not loading.
If you remove it, would it work?
Can you please also share us backend access, we might need to check the details.
Best regards,
Basilis
Hello Basillis
Thanks for very fast reply
I’ve try to clear all cache and minified code and it’s now work
Thank you!