Docs    Twitter    Documentation

How Do I Embed the Twitter Feed Directly into a Theme Template?

You can embed the feed directly into a template file by using the WordPress do_shortcode function:

<?php echo do_shortcode('[custom-twitter-feeds feed=1]'); ?>

This can also allow you to create dynamic feeds in a template. For example, a profile page for your users where the Twitter handle is saved in user meta:

$handle = example_get_twitter_handle();
<?php echo do_shortcode('[custom-twitter-feeds screenname="' . $handle .'"]'); ?>
support

Couldn’t find your answer in the docs?

Contact Support

Was this article helpful?