• We have disabled all Comments sitewide in the theme settings, but in the meta tags for the each post in the carousel, at the end of the meta tags it displays the following, | Comments 0

    The only setting to control visibility of the meta tags in the admin console is titled Show Post Meta with a toggle switch allowing for a Yes or No selection, but this only shows either all meta tags or no meta tags. I just want to be able to hide just the | Comments 0 meta tag.

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • Thread Starter msiau

    (@msiau)

    If anyone in the future is needing a solution here I came up with one using jQuery where it removes the specified number of characters (13) from the end of the p element that has a class of post-meta.

    <script>
    // Removes the text | Comments 0 from the end of the meta tags
    jQuery(document).ready(function(){
    jQuery(".post-meta").text(function(i, text) {
    return text.slice(0, -13);
    });
    });
    </script>
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.