• Resolved Prabhat Dutt

    (@prabhatdutt2)


    Hello guys
    My name is Prabhat and i have a website newscouncil.in . I am currently using the generate press theme but recently i have seen a mistake in the theme.
    Actually , your recent version of the theme doesn’t contain the responsive viewport code correctly.
    It has the code <meta name=”viewport” content=”width=device-width, initial-scale=1″ /> and i think there should not be /> at the end. This is causing the issue in search console as googlebot is scanning the pages in desktop mode and giving *text too small to read” error.

    I tried changing the code to <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> in my header.php and everything became fully mobile friendly in Google search console.

    Hope, this gets resolved.
    Thankyou
    Prabhat dutt

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • David

    (@diggeddy)

    Hi there,

    there is no bug in the theme and we do not hardcode the viewport meta.

    See here:

    https://github.com/tomusborne/generatepress/blob/4895a2e7595bb809075b375201fd735112f41570/inc/structure/header.php#L373

    That is the function we use to output the viewport meta.
    GP hooks the generate_add_viewport callback into the wp_head and that functions default value is this:

    <meta name="viewport" content="width=device-width, initial-scale=1">

    If you have different code in your header.php then someone must have edited that file

    Thread Starter Prabhat Dutt

    (@prabhatdutt2)

    @diggeddy Hey David
    Thank you for responding. I think I edited my theme file before. Everything is fine now.

    David

    (@diggeddy)

    As a general note – you should never edit the parent theme files, aside from potentially breaking your site, any changes you make to those files will be lost when the Theme is updated. Instead use a Child Theme.

    Glad to be of help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bugs in the theme’ is closed to new replies.