![]() If you'd like to give Curator.io's free forever plan a spin sign up today. In this article, we detail why you should embed your Twitter posts in your website, different tools you can use to do this for free, and a step-by-step tutorial.Ĭurator.io is an easy-to-customize aggregator that lets you pull from over a dozen sources. The benefits are many, and they include keeping your site fresh and maximizing post reach. When it comes to repurposing content, marketers often give the advice that you should turn your website blog posts into social media posts.īut what about the other way around? Why not put some of your social media content in your website? But I think the first method is more stable, since it's harder to inject the attribute into a possibly dynamic HTML structure.Embedding your Twitter feed in your website is a smart way to make the most of your content. We could also use the embed_oembed_html filter to dynamically add the data-cards="hidden" attribute, even on a per post basis or check for our own custom query parameters. Then there's the oembed_result to filter HTML returned by the provider. Here's how the Twitter provider url looks before: $provider = add_query_arg( 'hide_media', 1, $provider ) If( '' = parse_url( $provider, PHP_URL_HOST ) ) * Hide media for all twitter oEmbeds, using the hide_media=1 query argumentĪdd_filter( 'oembed_fetch_url', function( $provider, $url, $args ) ![]() Set an oEmbed query parameter of hide_media=true or add aĭata-cards="hidden" attribute to the resulting element to ![]() Here's one way using the oembed_fetch_url filter to add the hide_media query parameter, that's also mentioned in the Twitter doc page you linked to:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |