Domanda

For one of the clients, I have spin up a modern communication site collection and on the landing page of the same, I am seeing 'Get the mobile app' showing up, I was able to hide the 'feedback' button using css but no luck with Get the mobile app button.

Can someone please share css to hide 'get mobile app' button, appreciate the help.

È stato utile?

Soluzione

Try using below CSS:

a[aria-label^='Get the mobile app'] {
    display: none !important;
}

Or

div[class^='feedback_'] {
    display: none !important;
}

You can also vote on the similar UserVoice using below link:

Remove Get the mobile app and Feedback buttons.

Also, there is another way to hide feedback options tenant wide using PowerShell command:

Set-SPOTenant -UserVoiceForFeedbackEnabled $false

Note: I have not tried the PowerShell option. Also I read somewhere that it works only for "Feedback" button and not for "Get the mobile app" button. But you can give it shot and see if it works for you.

Altri suggerimenti

As for the selected answer, bare in mind several things.

  • Depending on the type of modern site, the powershell method will remove all buttons at once.
  • For those cases it doesn't hide (just user voice, but not the mobile) you would have to do decide what to do: deal with customers who might understand this is not an opt-out option or look for an alternative.

You can go the CSS way but do not go with a string selector, Get mobile app will only work for english speakers, all other users are left behind. Besides, going string selector is creating a strong coupling with translationss you don't have control over.

I you have no other choice but to go with CSS I suggest you create an SPFx extension, at least this will apply to all modern pages and you can even link the extension to a site design and make it a deployment step with any new site. Check site desing for SharePoint online and SPFx extensions for more information.

I know this is a lot harder, but a better SharePoint IS possible :)

https://kaboodlesoftware.com/products/framework-solutions-for-sharepoint-modern/kaboodle-branding-package/ <<<< There is a web part on this page which removes the buttons! And allows easy customation of the site with css/html/javascript :)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top