function the_post() {
global $wp_query;
$wp_query->the_post();
}
bu fonksiyon değişkene atanabilir mi sizce?
bulmaca gibi php - sizce?
3
●262
- 20-02-2018, 23:05:17$wp_query->the_post() fonksiyonun sonucunuda direk ekrana basıyor ise the_post methodunu bulup direk o methotdan return edebilirsin. fakat orası öyle olmak zorunda diyorsan şöyle birşey kullanabilirsin.
function the_post() { global $wp_query; ob_start(); $wp_query->the_post(); $out = ob_get_contents(); ob_end_clean(); return $out; } $the_post = the_post(); echo $the_post; - 21-02-2018, 21:59:39hocalarım ikisi de olmadı. aşağıda bu fonksiyon çağırılıyor. değişkene atamam konusunda başka yöntem varmıdır?
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
yassey adlı üyeden alıntı: mesajı görüntülecrooper adlı üyeden alıntı: mesajı görüntüle