You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're wanting to use different titles for Apple News. The apple_news_exporter_title successfully filters the title component on the article, but leaves the title that apple sees untouched. Which means that Apple's editorial isn't seeing the Apple-optimized titles.
Use Case
I'd like it if the apple_news_exporter_title filter changed both the title component and the actual title.
The text was updated successfully, but these errors were encountered:
So, I found that I can use the apple_news_generate_json filter to do what I want. However, I feel like the apple_news_exporter_title is confusingly documented, and should probably function to change both: the component with the role of "title", and also the "title" in the JSON. Here's the function I used:
/**
* Push different title to apple.
*/
function alter_apple_json_output( $json ) {
if ( get_field( 'apple_news_alternate_title' ) ) {
$json['title'] = get_field( 'apple_news_alternate_title' );
}
return $json;
}
add_filter( 'apple_news_generate_json', 'alter_apple_json_output' );
Description
We're wanting to use different titles for Apple News. The apple_news_exporter_title successfully filters the title component on the article, but leaves the title that apple sees untouched. Which means that Apple's editorial isn't seeing the Apple-optimized titles.
Use Case
I'd like it if the apple_news_exporter_title filter changed both the title component and the actual title.
The text was updated successfully, but these errors were encountered: