Let's say the text "Comments are closed" is a default WP String and you wanna change that text string to something else like "Hello World!" if
is_singular('post-type') is true.
Now, I do know that there is a plugin called Say What? which does this exact thing, you just have to provide the string of text and the respective text domain. But the problem is that whatever you change in this plugin it will become global for the entire website. You cannot use and conditional check and then change the text if the condition is true.
So, can any of you let me know if I can change the text without this plugin via normal code so that I can use any conditional statement I want.
Any help will be appreciated. Thanks.