Wordpress Custom Query

PHOTO EMBED

Sat Aug 14 2021 22:26:45 GMT+0000 (UTC)

Saved by @ayhan.yanbul #php

// Ö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;
?>
content_copyCOPY