i’m building a cinema website, i get an error if there is no content,
In the website i get this if i have no content:
Warning: Invalid argument supplied for foreach() in /home/cinema/public_html/cinema/wp-content/themes/movies/tabfilm/detali-film.php on line 25
My code for display scenarist is under:
<span class="film"><b>Scenarist</b><br /> <?php foreach(get_field('scenaristi') as $post_object): ?> <a class="arh-link" href="<?php echo get_permalink($post_object->ID); ?>"> <?php echo get_the_title($post_object->ID) ?></a><br /> <?php endforeach; ?> </span>
For example: if i do not want to display something, i wish to apear the text: No actors.
Thanks. Excuse my english
Ethichete Tags : is the tags from POST
Trailers Tags : http://www.diviziatm.ro/6.jpg
OK try this instead…
They cleared your code so just replace the code I sent before with this one.
PS It won’t generate a thumbnail I just want to see if it gets results
I don’t think those tags are properly in place. I should get all the posts with a Battleship tag when I go http://cinema.trancelevel.com/etichete/battleship/
- The topic ‘How can i fix this error’ is closed to new replies.