• Hi all,
    So my blog works fine when viewing from the normal url https://website.com/blog/

    However, I’m now trying to add 3 of the latest posts to my homepage, I’m using the following code:

    <?php
    					// Include WordPress Posts
    					require('/blog/wp-blog-header.php');
    					query_posts('showposts=3');
    
    					while (have_posts()): the_post(); ?>
    						<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    				<?php endwhile; ?>

    The require is working fine, but I’m getting this error message:

    Catchable fatal error: Object of class Module could not be converted to string in /website/blog/wp-includes/classes.php on line 273

    Does anyone have any insight?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Object of class Module could not be converted to string’ is closed to new replies.