FANDOM


  • We have a code on our wiki that allows us to hide comments on one page; this one:

    .page-pagename .WikiaArticleComments {display: none !important;}
    

    But is there a way to also hide subpages or all pages under the parent using this? I tried just having it be "pagename/subpage", but the subpage name after the slash doesn't work even though it works without the slash. I tried using something like & #47; (without the space) to replace the slash, but that didn't work either. I wondered if the * modifier could be used for parent + all subpages, but it still throws an error at me. Might anyone know how to edit this properly to hide the subpage?

      Loading editor
    • [class^="page-pagename"] .WikiaArticleComments {
          display: none !important;
      }
        Loading editor
    • Hello. Thank you, but it isn't working; I'm still seeing comments on the subpage. It also says that "attribute selectors with ^= are slow!" in the CSS comments, does that mean I will have to wait a while for it to take effect rather than working quickly?

        Loading editor
    • You may have to wait a while for it to take effect but not because of the selector. I am not sure what it means by "slow" but this is the best option unless you have a fixed list of subpages.

        Loading editor
    • If I do have a fixed list of subpages, is there a way to personally control comments on each one? As I was having trouble with what was after the slash in the url.

        Loading editor
    • I believe you replace the slash with an underscore to get the class.

        Loading editor
    • An underscore acts as a space rather than a slash for the page name, I don't know if it'd be easier to link the pages themselves for context?

      Update: It did work, thank you very much. I apologize for my impatience; most CSS had worked more quickly than this when I tested things out before. Thank you greatly for your time and help.

        Loading editor
    • Which one, the ^= or the underscore instead of slash? MediaWiki converts some characters when generating the class for a page. For instance, "Special:ListUsers" is "page-Special_ListUsers".

        Loading editor
    • Wouldn't removing article comments with CSS violate customization policy?

        Loading editor
    • Technically, yes. But since they asked for a specific page, I am assuming there is a particular reason they want to hide it (ex. popular spam target or "controversial" topic). As long as you can give a good reason why Fandom should make an exception, they will likely allow it.

      There was an example quite some time ago (I can't find the actual thread unfortunately) where a wiki had a rare use case for subpages in which having breadcrumb links in the page header actually made things more confusing. In that particular scenario, the got the "okay" from staff to hide the links using CSS.

      An example of my own, the wiki I admin is old and uses a "not officially supported" extension. A while back, some of the changes Fandom made interfered with one of the features. Staff allowed me to write my own JS to correct the inadvertent changes even though such modification to the interface constitutes a violation of the customization policy.

        Loading editor
    • Ah, I see. Makes sense, thank you for explaining!

      With that in mind, I'd suggest to OP to consider these points and reevaluate if hiding the article comments for specific pages is backed with robust reasoning, to be on safe side.

        Loading editor
    • FYI, FANDOM staff have said in the past that blocking all comments on a page is not a violation of the customization policy. Since Comments are not part of the Standard FANDOM features (they need to be enabled by an admin), the customization is allowed.

      Of course, contacting FANDOM staff is the only real way to know.

        Loading editor
    • I would not have guessed that; good to know. Still wouldn't hurt if there happened to be a good reason as well.

        Loading editor
    • I read over the customization policy, but did not see what could say that blocking comments would not be allowed. That said, thank you for the confirmation that it is okay. Yes, the only reason we block comments on very specific pages is because those pages attract a lot of arguing and people attacking each other. Since we want to keep our wiki kinder for the community, we only block comments if we have seen that those pages being open means that inevitable fighting will happen. On other pages, we would rather not block comments, because the community can interact or share their thoughts, so a full block of commenting would be as counter-productive as leaving all pages open.

        Loading editor
    • The part it could have been covered by is the generic "Removal, changed placement or changed functionality of ads, spotlights, standard Fandom features". However, it appears from Fandyllic's information that Fandom does not consider it a "standard" feature in this sense because admins can just disable it anyways.

        Loading editor
    • Another thing to put your mind at ease... over the years since the Comments feature was added we've given code on how to hide them on specific pages several times and I never remember anyone having it undone or prevented by FANDOM staff.

        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message
Community content is available under CC-BY-SA unless otherwise noted.