Gabriel Torres Posted December 8, 2021 Posted December 8, 2021 (edited) Hi, With article in pages, the platform automatically creates the description meta tags based on the article contents. In our databases, we have a custom field with a summary that could be better used as description. Is there a way for us to use that field instead of the default behavior? If not, that is a suggestion that I leave for a future version. Ditto for the keywords fields. Note: I know that I could adjust this manually using the SEO editor. however we have thousands of articles, using this editor is simply insane. Thanks. Edited December 8, 2021 by Gabriel Torres
Solution Sonya* Posted December 8, 2021 Solution Posted December 8, 2021 (edited) There is a workaround, if you would like to edit display record template. Add this on top of the template: {{\IPS\Output::i()->metaTags['description'] = $record->customFieldDisplayByKey('YOUR_CUSTOM_FIELD', 'listing');}} {{\IPS\Output::i()->metaTags['og:description'] = $record->customFieldDisplayByKey('YOUR_CUSTOM_FIELD', 'listing');}} This would overwrite the default description meta tag with the value of your custom summary field. Edited December 8, 2021 by Sonya* Gabriel Torres, Marc, Afrodude and 3 others 5 1
Marc Posted December 8, 2021 Posted December 8, 2021 There is no built in way to do this, however what Sonya mentioned above should do the trick Gabriel Torres 1
Gabriel Torres Posted December 8, 2021 Author Posted December 8, 2021 @Sonya* Thanks for the prompt reply. It worked like a charm! 🏆 Marc and Sonya* 2
Recommended Posts