[Support request] Adjusting Header.php

Home Forums Support Adjusting Header.php

This topic contains 2 replies, has 3 voices, and was last updated by  David 2 months, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1198209

    Michael

    Hi guys,

    I need your help again please! I have been having an issue creating a canonical 301 redirect from www to non-www version of my site. My host provider said it is not possible to add permanent changes to the Nginx config file because of how they have things set up and made this suggestion:

    “To help you, we’ve tested the method shown at https://wpgyan.com/how-to-redirect-to-another-page-in-wordpress/ with EasyWP and it worked just fine. Please try configuring it or let us know if we should help you with it. To configure it, please access the /wp-content/themes/generatepress/header.php file via FTP and add the code.”

    I’m not overly keen to mess with the generatepress theme files, so wanted to check if this sounds like it’s a good idea to you? And if adding an element rather for the header code would be better? Or would that not have the same effect? I’m asking you guys because EasyWP have not always come up with helpful solutions and I don’t entirely trust what they say, so wanted to run it by you first. Many thanks for your help.

    Michael.

    #1198237

    Vitor

    Hello Michael,

    You don’t need to change GP files, and it is really not recommended to do so.
    You can always use Hooks to insert code on various sections of your website.

    https://docs.generatepress.com/article/hooks-element-overview/

    Also check your website URL on you Settings > General and remove the www. from your URL in case you have it, maybe it helps.

    ~ Vitor @ GPSites

    #1198302

    David Customer Support

    Thanks Vitor – as he said Michael 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.