سلام ،روزتون به خیر و خوشی انشالله ، من این تابع رو وقتی اجرا میکنم وردپرس خطای
Attempt to read property "feeds" on null in C:\xampp\htdocs\wordpress\wp-includes\post.php on line 4767
میده ،
function all__post()
{
$arg = [
'post_type' => 'post',
'numberposts' => 2,
'offset' => 0,
'orderby' => 'date',
'order' => 'DESC',
'post_status' => 'publish',
];
$post = get_posts($arg);
foreach ($post as $item) {
$title = $item->post_title;
$cont = "آیا قصد خرید $title را دارید ؟";