• Resolved mpbrunelle

    (@mpbrunelle)


    I have created a Pod to show two different images in a <picture> element in a responsive layout.
    I have created this template:
    `<picture class=”bande”>
    <source media=”(min-width: 40em)”
    srcset=”{@image_desktop._src,esc_url} 932w”
    sizes=”932px”>
    <source
    srcset=”{@image_mobile._src,esc_url} 300w”
    sizes=”300px”>
    <img src=”{@image_desktop._src,esc_url}”
    class=”bande__img”
    alt=”{@attribut_alt}”>
    <picture>`
    I display this template with the auto template options, where it replaces the content.
    However, the code generated contains an extra <picture> element inside the <picture> element that I have specified, like this:

    <picture class="bande">
    		<source media="(min-width: 40em)" srcset="https://achilletartempion.com/wp-content/uploads/2020/01/11-histoire_Horizontal.jpg 932w" sizes="932px">
    		<source srcset="https://achilletartempion.com/wp-content/uploads/2020/01/11-histoire_Vertical.jpg 300w" sizes="300px">
    		<img src="https://achilletartempion.com/wp-content/uploads/2020/01/11-histoire_Horizontal.jpg" class="bande__img" alt="alt text">
    	<picture></picture></picture>

    I can’t figure out where that superfluous picture comes from. How can I get rid of it?

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

Viewing 1 replies (of 1 total)
  • Thread Starter mpbrunelle

    (@mpbrunelle)

    I have just figured it out. The closing tag for the picture element was not properly written.

Viewing 1 replies (of 1 total)
  • The topic ‘extra element in pod template’ is closed to new replies.