<div class="posts">
            <h2 class="mb-40">
                Recommended Powerlister


            $query_args = array(
                'post_type' => 'post',
                'posts_per_page' => 4,
                'meta_key'        => 'show_in_recommended',
                'meta_value'    => '1',
                'orderby'     => 'modified',
                'order'       => 'DESC',

            // The Query
            $the_query = new WP_Query($query_args);

            // The Loop
            if ($the_query->have_posts()) {
                while ($the_query->have_posts()) {

                    $recommended = get_field('show_in_recommended', get_the_ID());

                    $photo = get_field('photo', get_the_ID());
                    $company = get_field('company', get_the_ID());


                    <div class="card" style="text-align:left;padding: 0px;width: 100%; margin-left: 4px;">
                        <img src="<?php echo esc_url($photo['url']); ?>" class="card-img-top" alt="...">
                        <div class="card-body">
                            <h2 class="card-title"> <?php the_title(); ?></h2>
                            <p style="font-size: 14px;margin-bottom:0;font-weight: 300;"><?php echo $company; ?></p>
                            <p class="card-text" style="color:#AFAFAF;margin-bottom:0;"><?php echo get_the_date(); ?></p>
                            <a href="<?php the_permalink(); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/arow.png" alt=""></a>


                /* Restore original Post Data */
            } else {
                // no posts found


downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter