raeph
Forum Replies Created
-
Ha! Solved responsiveness in featured image, the layout=”responsive” attribute was missing. Updated featured-image.php code looks like this:
<div class="amp-wp-article-featured-image amp-wp-content featured-image-content"> <?php if ( has_post_thumbnail() ) { ?> <?php $thumb_id = get_post_thumbnail_id(); $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'medium_large', true); $thumb_url = $thumb_url_array[0]; ?> <amp-img src=<?php echo $thumb_url ?> width=450 height=338 layout="responsive"></amp-img> <?php } ?> <a href="<?php the_permalink(); ?>/amp"> </div>
Hey!
1. Yes, had to change the aspect ratio on line 80 in design-3/index.php.
2. I’m aware of that. My problem is that my featured images are not appearing in the single post. Checking the source shows that no image is loaded:
<div class="amp-wp-article-featured-image amp-wp-content featured-image-content"> <div class="post-featured-img"> <figure class="amp-wp-article-featured-image wp-caption"> <p class="wp-caption-text"> CF8F26 Saint Helena island RMS St Helena moored at Jamestown South Atlantic Ocean. Source: Alamy</p> </figure> </div></div><header class="amp-wp-content amp-wp-article-header ampforwp-title"> <h1 class="amp-wp-title">10 of the World’s Most Remote Inhabited Islands</h1> </header>
So, here’s my very amateur work around, which I’ve applied to /design-3/elements/featured-image.php:
<div class="amp-wp-article-featured-image amp-wp-content featured-image-content"> <?php if ( has_post_thumbnail() ) { ?> <?php $thumb_id = get_post_thumbnail_id(); $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'medium_large', true); $thumb_url = $thumb_url_array[0]; ?> <amp-img src=<?php echo $thumb_url ?> width=450 height=338></amp-img> <?php } ?> <a href="<?php the_permalink(); ?>/amp"> </div>
Of course, this looks crap on larger mobile devices (width > 450px) and I’m wondering if there is a responsive work around.
3. Custom plugin created. Works like a charm!
Also purchased Advanced AMP ADS plugin. You guys rule!
Thanks Ahmed.
1) Would you be able to point me to the CSS tag where I can change the aspect ratio?
2) Featured Image is supposed to show above the post title. It is not showing if you compare amp and non-amp versions.
3) Thanks will give extended amp a try!There is no option to selectively submit posts with this plugin at this point. +1 for having this.
Forum: Plugins
In reply to: [Instant Articles for WP] Support Facebook oembedsI second this. Kinda paradox that FB’s own video oembeds don’t work in Instant Articles.
Forum: Plugins
In reply to: [WP Like Button] I can't turn off the "Thank you" message in my Plugins page.Yes, that is super annoying!
Forum: Themes and Templates
In reply to: Theme : Nectar / Salient – problem since updating to WP 4.5Same problem here. All plugins up to date. VC not showing after update to 4.5 https://snag.gy/pq8ph.jpg
Forum: Plugins
In reply to: [Slideshow Gallery LITE] Change Transition from Fade to SlideHere’s a workaround:
change
animation: 'fade'
to
animation: 'slide'
both in gallery.to.slideshow.dev.js and gallery.to.slideshow.min.js within the js foder of the plugin. You’ll have to change it again after plugin update.Forum: Installing WordPress
In reply to: [Plugin: WP-FacebookConnect] 2.8 support?well, it worked for me on WP 2.8.1!
Forum: Fixing WordPress
In reply to: .htaccess & robots.txt problemUff! that thread saved me from getting completely crazy…
thanks for clarification Otto42!howdy, same with fontsize, “smallest=5&largest=50” does it only for tags…
Forum: Plugins
In reply to: wordTube & Featured Content Gallery… conflictI’ve got the same problem over here.
found this article (german).
His solution to the problem was to replace
“<?php the_content_rss(”, TRUE, ”, 20); ?>”
withthe_excerpt()
This might be a solution for you, but as I am using the “massive new” theme (wpelements.com) , this won’t do it for me as the post-thumb is placed in the excerpt.
So any solution to this is much appreciated.