// Örnek Query <?php $custom_args = array( 'post_type' => 'oneri-fikir', 'posts_per_page' => 1230, 'meta_key' => 'wpcf-begeni-sayisi', 'orderby' => 'meta_value_num', 'order' => 'DESC', 'oneri-donem' => '2021-1-donem', ); $custom_query = new WP_Query( $custom_args ); if ( $custom_query->have_posts() ) : while ( $custom_query->have_posts() ) : $custom_query->the_post(); $postid = get_the_id(); $fotopath = site_url() . '/wp-content/uploads/profil'; $author_name = get_the_author_meta('display_name', $author_id); $author_foto = $fotopath.'/'. get_the_author_meta('user_login', $author_id).'.jpg'; ?> <div></div> <?php endwhile; wp_reset_postdata(); else: ?> <div>Data yok</div> <?php endif; ?>
Preview:
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