Hello,

Happy New Year!

I'm trying to do something like that:

PHP Code:
<?php while ( have_posts() ): ?>
    <p>the_title()</p>
<?php endwhile; ?>
And here are my functions:

PHP Code:
function have_posts () {
    foreach(
$posts->all() as $current) {
        
$thePost->set($current);
    }
    return 
false;
}

function 
the_title() {
    
$current $thePost->get();
    echo 
$current->title;

Can anyone spot my error?

Regards,

-jj.