Hi,

I'm not having any luck tonight.
I can't get the code below in a foreach loop:

Code: 
    <div id="featured">
                <div class="scrollContainer">
                                        <?php
                                        add_filter('posts_fields', 'featured_fields');
                                        add_filter('posts_join', 'featured_join');
                                        add_filter('posts_where', 'featured_where_featured');
                    $featuredPosts = new WP_Query();
                    $featuredPosts->query('showposts=5');
                                        while ($featuredPosts->have_posts()) : $featuredPosts->the_post();
                    ?>
                    <div class="panel" id="post-featured-<?php the_ID(); ?>">
                        <div class="in-panel">
                                <a href="<?php the_permalink() ?>" title="<?php the_title_attribute('echo=1'); ?>"><img src="<?php bloginfo('url'); ?>/<?php echo get_post_meta(get_the_ID(), '_video_thumbnail',true)?>)"></a>
                                    <?php the_excerpt(); ?><br />
                        </div>
                    </div>
                    <?php
                                        endwhile;
                                        remove_filter('posts_where', 'featured_where_featured');
                                        ?>

                </div>
    </div>
The actual piece of code that needs to loop is:

Code: 
                    <div class="panel" id="post-featured-<?php the_ID(); ?>">
                        <div class="in-panel">
                                <a href="<?php the_permalink()  ?>" title="<?php the_title_attribute('echo=1'); ?>"><img  src="<?php bloginfo('url'); ?>/<?php echo  get_post_meta(get_the_ID(),  '_video_thumbnail',true)?>)"></a>
                                    <?php the_excerpt(); ?><br />
                        </div>
                    </div>
My coding skills are pretty basic but I got to a point where the loop was ok but the php code could ot be executed.
Any help would be appreciated.
AndroidApps Reviewed by AndroidApps on . Trying to create a ForEach loop #fail every time Hi, I'm not having any luck tonight. I can't get the code below in a foreach loop: <div id="featured"> <div class="scrollContainer"> <?php add_filter('posts_fields', 'featured_fields'); Rating: 5