Hi guys.
I need your help with get_next_post() function. So , I want to get next post’s ID but I’m getting error.
My code :
<?php
$next_post = get_next_post();
echo $next_post->ID ;
?>
Error:
Warning : Attempt to read property “ID” on string in test.php on line 10