• The img tags in the post are not being automatically converted into amp-img and the page doesn’t go through AMP validation.

    Anything special I need to do in order to make it work?

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor ampforwp

    (@ampforwp)

    Hello @uri3000

    Can you please tell me how you are adding this image and others.

    Please see this screenshot: http://take.ms/08z0bh

    Thread Starter uri3000

    (@uri3000)

    I am not talking about the featured image…. check the regular images on the post.

    Plugin Contributor ampforwp

    (@ampforwp)

    Hello uri3000

    Yes, can you please tell me how you are adding these images in the post.

    Please let me know.

    Thread Starter uri3000

    (@uri3000)

    Yes,
    Using the ACF WP plugin.
    I have a few custom fields and I created the following template for the post with these fields. This is the template (as you can see, it has tags which are not converted to amp-img):

    <?php
    $introduction = get_field(‘introduction’);

    if (isset($introduction) && trim($introduction)!=” && trim($introduction)!='<p></p>’) {?>
    <div class=”amp-wp-article-content”>
    <p><?php echo get_field(‘introduction’); ?></p>

    <div class=’topics-summary’>
    <h5>In this article:</h5>

      <?php while( have_rows(‘section_list’) ): the_row(); ?>
      <?php $title = get_sub_field(‘section_title_h2’); ?>
      <?php $reftitle = str_replace(” “, “-“, $title); ?>

    1. “><?php echo $title ?>
    2. <?php endwhile; ?>

    </div>

    <?php while( have_rows(‘section_list’) ): the_row(); ?>

    <?php $linkedpost = get_sub_field(‘section_linked_post’); ?>
    <?php $postlink = get_permalink($linkedpost->ID); ?>
    <?php $posttitle = get_the_title($linkedpost->ID); ?>

    <?php $title = get_sub_field(‘section_title_h2’); ?>
    <?php $reftitle = str_replace(” “, “-“, $title); ?>

    <h2>‘><?php echo $title; ?></h2>
    <p><?php echo get_sub_field(‘section_content’); ?></p>
    <?php if ($linkedpost != false) { ?>
    <div class=’section-read-more’><b>More on </b>“><?php echo $posttitle ?></div>
    <?php } ?>
    <?php endwhile; ?>
    </div>
    <?php
    }
    ?>

    Plugin Contributor ampforwp

    (@ampforwp)

    Hello uri3000

    Can you please contact me on team@magazine3.com so I can check it personally and solve it for you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘img tag not converted to amp-img’ is closed to new replies.