Accelerated-mobile-pages: Filter in components of AMP theme framework

Created on 23 Apr 2018  路  5Comments  路  Source: ahmedkaludi/accelerated-mobile-pages

All 5 comments

These filters will be very useful for AMP theme developers. amp-img needs to be filtered for example to change AMP layout attribute to "responsive".

<amp-img src="/img/amp.jpg"
  width="1080"
  height="610"
  layout="responsive"
  alt="AMP"></amp-img>

I would also suggest loop content to be filtered. That would allow us to exclude some categories, add custom fields content or adding post_types to the loop.

Thanks.

I noticed that on blog pages and archives that the images in design 2 were not responsive. Instead there is a use of thumbs where a fixed size can be set from the admin panel or it just defaults. Having responsive images in the loop would allow better designs to be made. I vote for that.

Sure, we will add filters so developers can modify the code according to their usage.

FIlter added to modify Image Attributes in AMP Theme Framework called "ampforwp_query_args"
and as @retroriff asked, we already have the a filter to modify the WP_Query called "ampforwp_query_args"

Filter is added and now can be modified according the use case.
馃憤

Great, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  4Comments

beingsmart3 picture beingsmart3  路  7Comments

carloosamarante picture carloosamarante  路  6Comments

satriaenur picture satriaenur  路  4Comments

seriou5 picture seriou5  路  5Comments