Viewing 1 replies (of 1 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    Please refer to amp-sticky-ad documentation: https://amp.dev/documentation/components/amp-sticky-ad/

    You can just place a configured <amp-sticky-ad> into your template. How exactly you do that depends on the mode of the plugin you are using.

    In Reader mode, you’ll also need (for the moment) to make sure the script gets added to the page by adding this to your custom theme’s functions.php or a custom plugin:

    add_filter(
    	'amp_post_template_data',
    	function( $data ) {
    		$data['amp_component_scripts'] = array_merge(
    			$data['amp_component_scripts'],
    			[
    				'amp-sticky-ad' => true,
    			]
    		);
    		return $data;
    	}
    );
Viewing 1 replies (of 1 total)
  • The topic ‘How to add amp sticky ads?’ is closed to new replies.