1. Home
  2. How To
  3. How to add View non AMP and other things in Header

How to add View non AMP and other things in Header

I am making this tutorial to show how to add View non-AMP and other things in Header.

So, let’s dig into it.

First, create a Custom plugin, you can just copy this code as well.

After creating a custom plugin, add the code in the header using the hook.

You can copy this code as well(only if you are using Design 2)


function view_non_amp_header(){

Note: Don’t forget to change the hook name if you are using a different design. You can check the hooks name here: Hooks in Header

You can add other things like text, images etc., as well.

Isn’t it easy? you can do it while having your morning coffee as well.

If you have any queries regarding this feel free to ask.

And don’t forget to leave the feedback if it helps you. 🙂

Ask your Questions Directly!
If you can't find the solutions in this article, then just ask us in the comments and we will answer it for you!
Updated on July 26, 2017

    Are you still looking for a solution?

    Then fill out the below form and we will reach out to you within a few hours.

    Was this article helpful?

    Related Articles


    1. Hi

      Thanks for this.

      What would I change the
      to if I am using the SWIFT?


      1. You can use ‘ampforwp_header_top_design4’ for Swift.

    2. Where exactly in the header am I putting this? Am I putting it across the entire website, or is there somewhere within the AmpforWP settings to do this?

    3. OK. I added to the header and it is within my AMP header now. But, is there a way to change the text? I’d rather it say “View Full Site” or something along those lines. Thank you in advance.

    4. Hi,
      I’ve used this custom plugin on other sites, and for the Swift theme I have:


      function view_non_amp_header(){

      but if I’m planning on using the Newspaper theme for AMP, the design isn’t design4. What would it be?

      1. Hi Cheryl Dimof,

        Newspaper is built on design 3 could you please use those hooks and if you have any issues then please let us know and we will personally help you.

    Leave a Comment