Hello,
To change the layout for tag archives alone, you can use our custom PHP function and adjust it per need: https://docs.oceanwp.org/article/203-altering-layouts
In this case, you would need to replace is_singular with is_tag. You can learn more about WordPress Conditional Tags here:
https://developer.wordpress.org/themes/basics/conditional-tags/
Also, alter the value of the $class variable per your need (based on the layout you want). All layouts are specified in the document.
To return a specific sidebar in this case, you can use Ocean Custom Sidebar to create a dedicated sidebar only for those tag archives: https://wordpress.org/plugins/ocean-custom-sidebar/
Once created, add widgets to it via Appearance > Widgets.
To assign this sidebar to those tag archives you can use this code: https://docs.oceanwp.org/article/267-alter-the-main-sidebar-display
Replace is_singular( ‘gallery’) with is_tag, and my_custom_sidebar_id with the correct sidebar ID you’ve created.
All PHP snippets must be added to the functions.php file of a child theme. If you’re unfamiliar with child themes, please see this doc: https://docs.oceanwp.org/article/90-sample-child-theme
Also, please note that personal customization is out of our scope. We already have lots of custom functions, and we’re also making sure to add new ones regularly, provided in our Developer Docs, like this one, so make sure you go through them: https://docs.oceanwp.org/collection/19-developer-doc
Hope this helps
Thank you for your detailed advice – I did exactly as you wrote and it worked perfectly!
You are most welcome and glad to know that solution worked for you.