Disable Comments Feed

I am working on a private site where the comments need to be hidden. I know how to remove the comments feed from the header, but can anyone give me some instructions on how to disable the comments feed altogether. Because all you need to do is add /feed/ to the single post and then you can see the comments feed.

strip last comma from get_the_category

foreach((get_the_category()) as $category) { echo $category->cat_name . ', '; } So I’m echoing it like this because I don’t want the categories to appear as hyperlinks, I just want the cat names. The problem is I can’t get rid of the last separator so it ends up like : category, category, category, I tried ‘stripping’ … Read more

Disable Debug Log Programmatically

I’m trying to disable WP_DEBUG_LOG if and only if debug.log exists. I’d like to hook into wp_footer and test if the file exists and if so disable my debug log. All I’ve found though is that WP_DEBUG_LOG is a constant and can only be changed from the wp-config.php file which is too early for my case. Is there a way to change it from a constant on install and keep it working as normal?