Archived topic
Two separate titles
23 replies · Started by Mike on June 10, 2019
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
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 :)
Thanks, I added the code but don't see where the field shows up
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 :)
thanks it worked beautifully.
any way to align the text so it is centered from the top and bottom?
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 :)
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
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.
So to change this configuration, I would need to go to Elements, and choose single posts or page hero?
Page hero has
<h1>
{{post_title}}
</h1>
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
Just to confirm, is there a custom field on the page you're viewing with the name text? What value does it have?
i put it as ultimate guide to odaiba
I changed the single posts element to
What is this Element ? Is it a Header Element ?