Skip to content
New issue

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

How to add custom image fields to Yoast Content Analysis #378

Open
2 tasks done
xanghyr opened this issue Jul 2, 2024 · 0 comments
Open
2 tasks done

How to add custom image fields to Yoast Content Analysis #378

xanghyr opened this issue Jul 2, 2024 · 0 comments

Comments

@xanghyr
Copy link

xanghyr commented Jul 2, 2024

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

I am using the plugin "Advanced Custom Fields: Image Aspect Ratio Crop" which adds a new field type "image_aspect_ratio_crop" to ACF. So this is still an image, but Yoast Content Analysis does not detect it.

As all my images are with "image_aspect_ratio_crop" I have the Analysis alert "No images appear on this page.". If I use a classic ACF "image" field the alert is gone, so this is it.

Please describe what you expected to happen and why.

I just want a way to tell Yoast "Consider this as an image".
I tried this :

add_filter( 'Yoast\WP\ACF\field_selectors', function ( $field_selectors ) {
	$field_selectors->add( '.acf-image-uploader-aspect-ratio-crop input[type=hidden]' );
	return $field_selectors;
});

But this does nothing. I don't know how to do this.

Technical info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant