If problems
-
Hi, I am trying to create a if sequense, but I don’t have any luck:
<?php // Works inside of the Loop function function_name() { global $post; $thePostID = $post->ID; } ?> <?php foreach(get_field('matcher') as $matcher): ?> <?php foreach( get_post_meta($matcher->ID, 'vinnare') as $vinnare): ?> <?php foreach( get_post_meta($matcher->ID, 'vinnarenamn') as $vinnarenamn): ?> <?php foreach( get_post_meta($matcher->ID, 'forlorarenamn') as $forlorarenamn): ?> <?php echo $thePostID /// Just for testing?> <?php echo $vinnare ?> <?php if ($vinnare == $thePostID) { ?> Test <?php }?>My problem is that the $thePostID don’t return any value – so I guess thats why the if statement don’t work…
Can anybody help me?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘If problems’ is closed to new replies.