New Pro + Launch: pick a template and our developers set up your site in 2 business days.
See how it works
Solved Community

How do I show a custom field in the blog layout?

I added a custom field "Event date" to articles. It shows on the article page but not in the category blog list. Is there a setting, or do I need an override?
Joomla
5.x
0
Votes
Undo
Solution
Manhta ThePixel team Solution 2 weeks ago · #98
Automatic Display depends on the layout firing the content events, and many templates' blog overrides leave them out for intro items. The reliable way is a small override: 1. Copy components/com_content/tmpl/category/blog_item.php to templates//html/com_content/category/blog_item.php 2. Where you want the date, add: item, true) as $field) : ?> name === 'event-date') : ?>

value; ?>

With true the value comes back formatted by the field type. Use the field's name (alias), not its label.
Jackie Free 3 weeks ago · #97
I had the same. In the field's options there is "Automatic Display" – mine was set to "After Display Content" and it still did not show in the blog.
Manhta ThePixel team Solution 2 weeks ago · #98
Automatic Display depends on the layout firing the content events, and many templates' blog overrides leave them out for intro items. The reliable way is a small override: 1. Copy components/com_content/tmpl/category/blog_item.php to templates//html/com_content/category/blog_item.php 2. Where you want the date, add: item, true) as $field) : ?> name === 'event-date') : ?>

value; ?>

With true the value comes back formatted by the field type. Use the field's name (alias), not its label.
John Bren Free Asker 2 days ago · #99
The override works – thank you both.
No replies yet. The community and our team answer questions here.

Log in to reply or follow this question

Free accounts ask in Community. Pro members ask our developers in Templates and Extensions.

Log in Sign up free
Cron Job Starts