Skip Navigation

[Resuelto] Disabling Comments for a Post Type or in a Layout

This support ticket is created hace 4 años, 8 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por aaronM-9 hace 4 años, 8 meses.

Asistido por: Nigel.

Autor
Mensajes
#1559149

Can you explain how I can disable comments on a particular post type? I thought there was a setting in Layouts to do this but I can't seem to find it. When the user is logged in, I don't want it to allow or display comments for any posts under the post type "Brands". I'm using Astra as my theme. Thanks for any help.

- Aaron

#1559711

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

Support for comments is specified in the settings for a custom post type, which you can adjust at Toolset > Post Types when editing the post type in question, and they are output by your theme, Toolset doesn't otherwise affect them.

But the way support for comments works is a little odd. If enabled, it allows you to enable/disable comments on individual posts.

If you revoke support for comments on a post type that has it, then it will simply remove the ability to turn on/off comments on individual posts, but it won't remove comments or the comment form from posts which previously had it, and there is nowhere in the settings you can readily do that.

If it is the case that you created a custom post type and enabled comments support, published some posts where comments are enabled, and now want to remove the comments UI, you could re-enable comments support for the post type and then edit each of the posts (or bulk edit) and disable the comments post-by-post.

If you already have a lot of such content the easiest solution may be to copy the single.php theme template to a more specific template for your post type, e.g. single-my-cpt.php, and then edit that template to remove the part which outputs the comments. (This assumes the theme doesn't offer such options to disable the comments.)

#1560629

Thanks - I ran a SQL query to close all comments.

- Aaron