WordPress.org

Ready to get started?Download WordPress

Forums

Use custom field text as a "headline" (1 post)

  1. Mindsphere
    Member
    Posted 4 years ago #

    Hey guys,

    So basically I want to be able to create a custom field in my post and have the front page of my blog display it as a headline.

    Right now my site - wwww.dailybludge.com.au - simply takes the title from the most recent post as the headline with the code: <?php the_title(); ?> (the post is selected with a bunch of other code earlier)

    Is there a simple bit of code I could use to grab a custom field from the most recent post, letting me have a different headline to the actual post title?

    Secondly, is there a way to get the front page to display an image based on an url in the custom field of the most recent post? I want this to display directly below the headline.

    Cheers!

Topic Closed

This topic has been closed to new replies.

About this Topic