• Resolved amyrogers

    (@amyrogers)


    I wanted to display the title of the latest post on my blog on my regular home page, which is file “home.php.” This home page is at mywebsite.com/home.php. The blog is at mywebsite.com/blog/. I used the following code, but got an error.

    <?php
    require('blog/wp-content/themes/amy/header.php');
    ?>
    
    <?php query_posts('showposts=1'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a><br />
    <?php endwhile;?>

    Error message:

    Fatal error: Call to undefined function: language_attributes() in /home/server/amy/mywebsite.com/blog/wp-content/themes/amy/header.php on line 2

    How do I fix this?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Displaying the latest post title on a regular home page’ is closed to new replies.