I have my wordpress site. Which has the normal "post" and a custom post type "download", I Currently use IFTTT, (If This Then That Service) to post my wordpress posts to Twitter.

The IFTTT recipe works perfectly for my posts, and tweets as soon as I publish any post. You can check my site https://milyin.com, and my twitter account is https://twitter.com/milyincrealtors/

The problem is that, this works only for normal wordpress posts. I searched IFTTT for applets to include custom post types, that didn't work, and i can not find a solution on stack exchange also.

How can i use IFTTT, to tweet any new post of post type 'download'

I love IFTTT, and i don't want any plugins that slow down my site. So please provide me with the code, that ensures that my IFTTT applet is triggered for this custom post type also.

2 Answers 2


IFTTT works from RSS feed, simply including your post in wordpress RSS feed can do the trick...

function add_cpt_to_loop_and_feed( $query ) {
    if ( is_home() && $query->is_main_query() || is_feed() )        
    $query->set( 'post_type', array( 'post', 'download' ) );    
    return $query;

This is the off topic question. But the answer is yes it is possible.

In IFTTT we can use the Feed applet like "Feed to Tweet".

So, Just create the the Feed applet with your custom post type feed URL.

WordPress generates the feed URL for each post type. You can get it as below:


E.g. Feed URL of custom post type "Shortcode" is


See the Shortcode post type feed URL.

  • Hey My problem is that i want to include posts, tags, image, title and link for the custom post in the tweet. Commented Oct 9, 2019 at 12:41
  • Will this solution give tags and images also? I am not at all aware of how IFTTT and wordpress work... Also, i thought of adding the custom post type to default wordpress rss feed... Can adding custom post type to rss feed do the trick? Commented Oct 9, 2019 at 12:43
  • I think the tag option is not available in the feed applet. See i.imgur.com/pkC5EWY.png Commented Oct 9, 2019 at 13:07
  • Yep, connecting wordpress directly, to ifttt has the option to include images, tags, categoriess. Commented Oct 9, 2019 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.