mikeiskool
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Plugins
In reply to: [AMP] amp-ad extension .js script’ is missing or incorrect errorsWe are loading the
amp-ad
usingamp_content_sanitizers
(see below). How would you recommend we load the amp-ad extension script?class SK_AMP_Ad extends AMP_Base_Sanitizer { public function sanitize() { $body = $this->get_body_node(); // Build our amp-ad tag $style_node = AMP_DOM_Utils::create_node( $this->dom, 'div', array( 'class' => 'amp-ad-style', )); $ad_node = AMP_DOM_Utils::create_node( $this->dom, 'amp-ad', array( // Taken from example at https://github.com/ampproject/amphtml/blob/master/builtins/amp-ad.md 'width' => 300, 'height' => 250, 'type' => 'doubleclick', 'data-slot' => '/xxx/640x480_ROS', 'json' => $sponsAd, ) ); // Add a placeholder to show while loading $fallback_node = AMP_DOM_Utils::create_node( $this->dom, 'amp-img', array( 'placeholder' => '', 'layout' => 'fill', 'src' => 'https://placehold.it/300X250/fff/ccc?text=ADVERTISEMENT', ) ); $ad_node->appendChild( $fallback_node ); $style_node->appendChild( $ad_node ); } }
- This reply was modified 7 years, 1 month ago by mikeiskool.
Forum: Plugins
In reply to: [AMP] amp-ad extension .js script’ is missing or incorrect errorsI am also having this issue. When I look in the network tab of my browser I see it is loading the amp-ad-0.1.js file but it is not in the HTML so it is not valid according to Google. See below for a link to a post with the warning:
Forum: Plugins
In reply to: [Yoast SEO] Remove rel=”next” and rel=”prev” from front-pageFound a fix. This is what I added:
function wpseo_disable_rel_next_home( $link ) { if (is_front_page()) { return false; } } add_filter( 'wpseo_next_rel_link', 'wpseo_disable_rel_next_home' );
- This reply was modified 8 years, 5 months ago by mikeiskool.
Forum: Plugins
In reply to: [Yoast SEO] Remove rel=”next” and rel=”prev” from front-pageOk I’ll look into that. I assumed it was Yoast outputting it since it’s in the Yoast section of the source code:
<!– This site is optimized with the Yoast SEO plugin v3.7.1 – https://yoast.com/wordpress/plugins/seo/ –>
<link rel=”next/prev” href=”/whatever” />
<!– more stuff –>
<!– / Yoast SEO plugin. –>
- This reply was modified 8 years, 5 months ago by mikeiskool.
- This reply was modified 8 years, 5 months ago by mikeiskool.
Viewing 4 replies - 1 through 4 (of 4 total)