Featured

Article Path: Business » Marketing » Add AMP Featured Image to WordPress

Michael Brown

Mike is a seasoned digital marketer who specializes in search engine optimization. He has over 15 years experience in marketing websites in many different industries. He has worked with clients who are in market for lead generation, point of sales, and ecommerce. Digital marketing is a passion of mikes and is always looking for ways to improve, promote, and optimize the digital footprint of all his clients. Mike currently resides in Maryland where he manages many websites and digital marketing campaigns.

15 Comments

  1. Muhammad Shoaib
    April 21, 2016 @ 9:21 am

    Hey this method doesn’t work. When i did the as per your instruction and open my link. It did not show any content except only header of the page.

    Reply

    • Michael L. Brown Jr.
      April 21, 2016 @ 1:37 pm

      Hello Muhammad,
      Could you provide me with a link to example of your issue? I know this method works, but I want to see where my instructions went wrong. Thanks,

      Reply

      • Muhammad Shoaib
        April 23, 2016 @ 4:31 pm

        Still not.

        Reply

        • Michael L. Brown Jr.
          April 25, 2016 @ 4:59 pm

          Hello Muhammad, I went through this process on a fresh install with Twenty Sixteen and it worked for fine. Could you provide me with some of the pages you are working on?

          Reply

          • Muhammad Shoaib
            April 25, 2016 @ 5:28 pm

            Hey @MegaMikeJr:disqus Thanks for replying. Here is the link of the blog post which i am trying to add featured image. http://infotainworld.com/women-universities-in-pakistan/amp/

          • Michael L. Brown Jr.
            April 25, 2016 @ 5:56 pm

            I didn’t see any call from the single.php file located in /amp/templates/single.php. Do you have the amp-img formatting in your functions.php located in your Bimber theme directory?

          • Muhammad Shoaib
            April 25, 2016 @ 6:01 pm

            I did that previously and followed all of the instruction but my article content got vanished by doing that.only header was showing. So i removed that file and all the codes.

          • Michael L. Brown Jr.
            April 25, 2016 @ 6:11 pm

            Try adding the code to your themes functions.php at the very end of the file. Do not create a custom-functions.php file. There is nothing in there that would break your page unless you put the code in the wrong place of your functions.php or forgot to add the ” Editor > Select “AMP” > And choose the file “amp/templates/single.php”. This should work for you.

    • Erick Gutierrez
      August 13, 2016 @ 1:00 pm

      Hi, I was facing the same problem and I discovered the solution…
      When you cut and paste the code, came with this: ‘ that is different of ‘
      Try to replace the quotation marks, worked fine to me.

      Reply

  2. zed
    May 21, 2016 @ 6:47 am

    Hi Michael,
    Great (y), its work for me. I have tried a lot, but finally your tutorial works very well. thumbs up.
    I have a little issue in feature images, can you help me out?
    Feature image now displaying, but the size is small (150 X 150) even the size is set to the ‘full’ ($size = ‘full’).
    Can you sort out that where i am going to wrong?
    Thanks

    Reply

    • Michael L. Brown Jr.
      May 24, 2016 @ 1:42 pm

      You can adjust the code in the plugin file called “amp/templates/single.php” to represent dimensions
      You have to be careful setting the pixels to high otherwise it would be counter-productive. Let me know if this works for you or not.

      Reply

      • zed
        August 5, 2016 @ 12:09 pm

        Hi Michael,
        Yes i have put all code in “amp/templates/single.php”, it looks good. But again facing a problem, i.e. sometime feature image appears large and sometimes as thumbnail, even i have place the code like this. “isa_amp_featured_img(‘large’)”.
        Thanks

        Reply

  3. Kasey Moore
    August 8, 2016 @ 9:05 am

    How do you then get this working in responsive terms?

    Reply

    • Michael L. Brown Jr.
      August 14, 2016 @ 3:09 am

      Hi Kasey,
      AMP is mobile focused. The images are intended to be mobile first. Hope this answers your question.

      Reply

  4. Kringle Claus
    November 20, 2016 @ 7:36 pm

    *** IMPORTANT!
    Please change the “smart quotes” in your code to plain quotes. AMP chokes on the curly/unicode quotes.
    For e.g.: look very carefully above at:
    (or better yet, copy all the code into Word and increase the font size 🙂
    Thanks for posting the code though — makes the pages much more interesting to read!
    Santa

    Reply

Leave a Reply

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