• Resolved ginmonty

    (@ginmonty)


    I’m working on a page template and I’d like to display a H1 heading on the page. The rest of the content on this page is generated by a XML feed so we have the_content (); commented out.

    I’d like to be able to add the H1 content (not the page title) in the WordPress page editor and have it display above the rest of the XML-generated content.

    I’m trying to teach myself some of the more advanced elements of WordPress so I’m very new to modifying templates in this way. Any help is appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Where’s the H1 content coming from if it’s not the title? Are you proposing using post content as H1 content, while the actual content comes from the XML feed? Then you could simply do

    <h1><?php the_content(); ?></h1>
    // output XML feed next

    Other possible sources are the dedicated excerpt field or some other custom field. You can get custom field data with get_post_meta().

    Thread Starter ginmonty

    (@ginmonty)

    I was able to achieve what I wanted with get_post_meta(). THANK YOU!!!!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display H1 content In Page Template’ is closed to new replies.