• Resolved doumas

    (@doumas)


    Support UUID: ampwp-24362724-69b6-54b5-b109-388f15444dfd

    Hello,

    I was wondering if it is possible to edit the AMP Template. There are some options in the Tag Div Theme Panel but they are certainly not enough. I did a search and I found out that the AMP AddOn offered by Tag Div differs from the stand alone addone offered in the addons section of WordPress.

    Thank you in advance

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @doumas

    Thank you for contacting us, the tagDiv overwrites the AMP template and settings programmatically so We are unsure if AMP templates forced by them can be overwritten. it’s best to contact tagDiv team for support.

    The default AMP plugin behavior to overwrite the AMP template is by creating a directory in your child themes called /themes/your-child-theme/amp/ and use the create a file with the template name. eg: single.php

    In case you are using AMP in Reader Mode with the legacy theme you can also use the amp_post_template_file filter
    eg:

    add_filter( 'amp_post_template_file', function ( $file, $type, $post ) {
    	if ( 'single' === $type && 'xyz-review' === $post->post_type ) {
    		$file = dirname( __FILE__ ) . '/templates/my-amp-review-template.php';
    	}
    	return $file;
    }, 10, 3 );

    You can learn more about template overriding in our documentation

    We hope this helps!

    Plugin Support Milind More

    (@milindmore22)

    @doumas As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you require any further assistance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Editing AMP Template’ is closed to new replies.