i cut the connection between Blog Title and Title Tag, thats nice. The thing is that in recent posts, HubSpot uses the Title Tag to display the most recent blog articles.
I would like to have the Blog Titles there. Otherwise its confusing for the reader to click on a link and get to the blog article that has a different title then.
Sorry @Tintenton, I think I gave you the wrong line number. I edited line 74 instead and now the post listings on the listing page have the same title as the posts themselves. For the sidebar issue, we cannot edit the popular post module to contain those titles. Instead, we'll need to use the custom code I mentioned to use your custom titles {{ content.widgets.blog_display_title.body.value }}.
For that, you'd need to create a custom module, then replace the default module to have this code:
<div class="sidebar-item">
{% set pop_posts = blog_popular_posts('blog_id_here', 5) %}
<h2>Meist gelesen<h2>
{% for pop_post in pop_posts %}
{% if not pop_post.widgets.blog_display_title.body.value %}
<h2><a href="{{ pop_post.absolute_url }}">{{ pop_post.name }}</a></h2>
{% else %}
<h2><a href="{{ pop_post.absolute_url }}">{{ pop_post.widgets.blog_display_title.body.value }}</a></h2>
{% endif %}
{% endfor %}
</div>
the tag {{ content.name }} corresponds with the title from the Settings of your blog posts. You should instead use {{ content.widgets.blog_display_title.body.value }}. That said, it might be worth using some logic for instances where blogs may or may not have a value placed in your custom title field. Something like this should work:
Hi @Tintenton, Is there any way you can clarify a bit further as to what your intentions are? I do not see any difference between the Title that gets displayed in the sidebar and the main title of an individual article.
Hi @Tintenton, can you respond with a link to your blog and your HubID? You'll need to use the blog recent posts hubl tag to do what you're currently looking for, rather than the default module.
Hey @Connor_Barley
thank you for your answer. Unfortunately that does not help me or i need some further help how.
You are right, i am referring to the recent post module in the post listing. I want HubSpot to use the actual Blogpost Title and not Title Tag when displaying an article in recent posts.
How could that function be changed so it takes blogarticle titles?
Thank you for our help.