Black Friday sale! Get up to 25% off GP Premium! Learn more ➝

[Resolved] hack – Page Header Template Tags

Home Forums Support [Resolved] hack – Page Header Template Tags

Home Forums Support hack – Page Header Template Tags

  • This topic has 2 replies, 2 voices, and was last updated 6 years ago by Tom.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #416378
    Coen

    Hello Wizards,

    I have a question about the page headers:

    I now have this inside Content area:

    <h1>{{post_title}}</h1>

    And it outputs this on my single post pages:

    Thank You Japan!

    October 25, 2017 | Coen

    This is fine, although a bit strange as it also pulls in the Date and the Author? You would suspect it only to output the Title?

    Now we are starting with some guest post, so the author would be different. I don’t want to give those a user access.

    I could manually enter the Date and Title in a new page header, but my first idea is that I want to make a generic page header called Guest Post where I replace the Author Name by Guestpost.

    How can I only pull in the Title of the post and the Date, so that I would end up with something like this:

    <h1>{{title}} <br>
    {{date}} | Guest Author
    </h1>

    Or is there a better way, maybe even something I can enter in the post entry that pulls in a author name without having to add a WP user?

    —C

    #416424
    Coen

    Ahummm…

    I stand corrected…

    The code that I had in the Single Page was as following and it solved the puzzle itself.

    <h1>{{post_title}}</h1>
    {{post_date}}  |  {{post_author}}

    —C

    #416433
    Tom
    Lead Developer
    Lead Developer

    Glad you got it figured out 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.