Is instant_articles_should_submit_post really working?
-
There are some posts on our website that use features not supported by Instant Articles, like sliders from Nextend SmartSlider3 plugin.
Since they’re a relevant part of the post, we chose to block them from being submitted to IA, using the instant_articles_should_submit_post:
add_filter( 'instant_articles_should_submit_post', 'custom_instant_articles_should_submit_post', 10, 2 ); function custom_instant_articles_should_submit_post($should_show, $IA_object) { if ($should_show) { $post = get_post($IA_object->get_the_id()); if (strpos($post->post_content, '[smartslider') !== FALSE) { $should_show = FALSE; } } return $should_show; }
Not a fancy solution, but it should be working, as the following message appears on the post edit screen:
This post will not be available as Instant Article due to a rule created in your site.
However, the post was published to IA, regardless of the message.
Am I missing something?
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Is instant_articles_should_submit_post really working?’ is closed to new replies.