Categories
Progressive Web App(PWA)

How to add short-name to PWA & fix “Web App Manifest lacks a short name entry”

If you are implementing Progressive Web App(PWA) in your WordPress website, make sure that you have a short-name field added to the manifest file.

If your WordPress site doesn’t have the short name of your PWA, the site health report in your website will have a “Web App Manifest lacks a short name entry in Progressive Web App(PWA)” message in recommended improvements section.

Recommended Improvement from Site Health Report to add PWA short-name

To implement the recommendation, you have to add a short name to the PWA manifest file which is within 12 characters long.

If you are using the PWA plugin, you have to add the following code to functions.php file in your current active theme :

add_filter( 'web_app_manifest', function( $manifest ) {
    $manifest['short_name'] = 'myshortname';   // change 'myshortname' with your shortname, make sure that its within 12 characters long.
    return $manifest;
} );

If you still have any question or need any help with PWA implementation in your WordPress website. You can always comment here or contact me.

By Murali Kumar

I am a Full Stack Web Developer with over 12 years of experience. I love WordPress & WooCommerce.

If you need help of a WordPress developer for your website, Get in touch now!.

Leave a Reply

Your email address will not be published. Required fields are marked *