[Resolved] Two separate titles

Home Forums Support [Resolved] Two separate titles

Home Forums Support Two separate titles

Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • #925360
    Mike

    Hello
    On my main site, I have thumbnails with the post title. I kept it as just the location (single word) to make it short.

    Is it possible to change the title of the post to something longer, instead of the single word? Instead of (Location), I want it to be 5 Things to Do in (Location)

    Thank you

    #925366
    Leo
    Staff
    Customer Support

    Hi there,

    Instead of using the {{post_title}} template tag in the page hero, you can try using the custom field to show the longer title instead:
    https://docs.generatepress.com/article/header-element-template-tags/#custom_field-name

    Let me know if this helps πŸ™‚

    #925382
    Mike

    Thanks, I added the code but don’t see where the field shows up

    #925384
    Leo
    Staff
    Customer Support

    Make sure custom field is activated for posts under the screen options:
    https://www.wpbeginner.com/wp-tutorials/wordpress-custom-fields-101-tips-tricks-and-hacks/

    Let me know πŸ™‚

    #925391
    Mike

    thanks it worked beautifully.
    any way to align the text so it is centered from the top and bottom?

    #925405
    Leo
    Staff
    Customer Support

    Setting the same top and bottom padding should work:
    https://docs.generatepress.com/article/how-to-create-a-page-hero/#step-5-position-the-content

    Let me know πŸ™‚

    #1299767
    Mike

    I came back to generatepress and I’m not sure how to make this work again. I am using description as the custom field name with my desired custom title but not showing up

    #1300118
    David
    Staff
    Customer Support

    Hi there,

    you use this template tag:

    {{custom_field.name}}

    name gets swapped for your custom field name. So yours would be:

    {{custom_field.description}}

    I would suggest that choose a less generic custom field name – as that same name is already used for the Category Description.

    #1300985
    Mike

    So to change this configuration, I would need to go to Elements, and choose single posts or page hero?

    #1300986
    Mike

    Page hero has
    <h1>
    {{post_title}}
    </h1>

    #1301084
    Mike

    Ok, so I changed the variable from description to “text”

    I changed the single posts element to
    <center>
    <h1>
    {{custom_field.text}}
    </h1>
    <h4>
    <i>Last Updated: {{post_date}} </i>
    </h4>
    </center>

    and I changed the page hero element to:

    <h1>
    {{custom_field.text}}
    </h1>

    But still not showing up for some reason

    #1301262
    Tom
    Lead Developer
    Lead Developer

    Just to confirm, is there a custom field on the page you’re viewing with the name text? What value does it have?

    #1301481
    Mike

    i put it as ultimate guide to odaiba

    #1301502
    Mike
    #1301654
    David
    Staff
    Customer Support

    I changed the single posts element to

    What is this Element ? Is it a Header Element ?

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