FSahin adlı üyeden alıntı: mesajı görüntüle
Kodları foruma ekleyemedim. Şuradan bakabilirsiniz.

http://controlc.com/9e229663
FSahin adlı üyeden alıntı: mesajı görüntüle
Kodları foruma ekleyemedim. Şuradan bakabilirsiniz.

http://controlc.com/9e229663
Aynen hocam aradığım buydu, teşekkürler. Şöyle kullandım bir hatam varsa uyarır mısınız.

Yaptığım alan:


Kullandığım kodlar:
echo '<div class="featured-content row">';

    // The Query
    $the_query = new WP_Query( array(
        'cat' => 3,
        'posts_per_page' => 1
    ) );

    // The Loop
    if ( $the_query->have_posts() ) {
        while ( $the_query->have_posts() ) {
            $the_query->the_post();
            echo '<div class="col-xs-6"><div class="grid-first">
                <a href="'; the_permalink(); echo '" title="'; the_title_attribute(); echo'" rel="bookmark">';
                    the_post_thumbnail( 'featured-content-thumbnail-first' );
                echo '</a>
                <h2 class="overlay">';
                    the_title();
                echo'</h2>
            </div></div>';
        }
    } else {
        // no posts found
    }

    // The Query
    $the_query = new WP_Query( array(
        'cat' => 3,
        'posts_per_page' => 4,
        'offset' => 1
    ) );

    echo '<div class="grid col-xs-6">';
        // The Loop
        if ( $the_query->have_posts() ) {
            while ( $the_query->have_posts() ) {
                $the_query->the_post();
                echo '<div class="col-xs-6">
                    <a href="'; the_permalink(); echo '" title="'; the_title_attribute(); echo'" rel="bookmark">';
                        the_post_thumbnail( 'featured-content-thumbnail' );
                    echo '</a>
                    <h2 class="overlay">';
                        the_title();
                    echo'</h2>
                </div>';
            }
        }
    echo '</div>';

    /* Restore original Post Data */
    wp_reset_postdata();

echo '</div>';