We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I was testing amp-theme-framework and very first bug I noticed is that featured image for custom page is not working. For other pages it works
I have found the source of the issue and may be it will help you guys to fix this.
if( true == ampforwp_has_post_thumbnail()){} // It's always false because of (2) so featured image don't show up.
if(has_post_thumbnail()){ return true; } // has_post_thumbnail() is false, somehow global $post is not working here.
Adding an arg $post_id to the function ampforwp_has_post_thumbnail will fix this.
function ampforwp_has_post_thumbnail($post_id){ global $post, $redux_builder_amp; if(has_post_thumbnail($post_id)){ return true; } ...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I was testing amp-theme-framework and very first bug I noticed is that featured image for custom page is not working. For other pages it works
I have found the source of the issue and may be it will help you guys to fix this.
Line no - 23
if( true == ampforwp_has_post_thumbnail()){}
// It's always false because of (2) so featured image don't show up.
Line no - 10599
if(has_post_thumbnail()){ return true; }
// has_post_thumbnail() is false, somehow global $post is not working here.
workaround
Adding an arg $post_id to the function ampforwp_has_post_thumbnail will fix this.
function ampforwp_has_post_thumbnail($post_id){ global $post, $redux_builder_amp; if(has_post_thumbnail($post_id)){ return true; } ...
The text was updated successfully, but these errors were encountered: