內容簡介
IFTTT (if this, then that) 是目前最棒的網路服務之一,它可以讓您連接不同的網路服務帳號,以創建所謂的「食譜 (recipes)」。例如,我有一個食譜,當我收藏 YouTube 影片時,它會在我的網誌上建立一個新的 WordPress 文章。
不幸的是,IFTTT 沒有提供指定文章格式或自定文章類型的方法,因此此外掛提供了一些方法來更新這些。
要設置文章格式,您需要將 IFTTT 中的類別設置為下列類別之一:
ifttt-aside
ifttt-gallery
ifttt-link
ifttt-image
ifttt-quote
ifttt-status
ifttt-video
ifttt-audio
ifttt-chat
因此,對於我的 YouTube -> WordPress 食譜,我將其添加了「ifttt-video」類別,並在 IFTTT 中(IFTTT 允許您指定要建立的文章類別),當發佈時,格式就被設置了。
如果您想將新文章設置為自定文章類型,您可以通過將 IFTTT 中的類別設置為與此模式相匹配的類別來實現:ifttt-posttype-{post_type_slug}。因此,如果您想要使用 IFTTT 建立新的 WordPress 頁面,您可以添加「ifttt-posttype-page」類別。
最後,如果您想將 IFTTT 類別存儲為不同的分類法,您可以通過將 IFTTT 中的類別設置為與此模式相匹配的類別來實現:ifttt-taxonomy-{taxonomy_slug}。
注意:這些特殊的「ifttt-*」類別實際上不會設置在文章/頁面/物件上。這些是「特殊」類別,僅用作發送數據的文章格式、文章類型或分類法的標誌,它們會從實際儲存到文章中的類別列表中刪除。
希望您會發現這很有用!
歡迎在 GitHub 上貢獻或分支此外掛。
外掛標籤
開發者團隊
② 後台搜尋「IFTTT Post Formats & Post Types」→ 直接安裝(推薦)
原文外掛簡介
IFTTT (if this, then that) is one of the coolest web services available, and allows you to connect your different web service accounts to create ‘recipes’. An example of a recipe that I have is to create a new WordPress post on my blog whenever I favorite a YouTube video.
Unfortunately IFTTT doesn’t have a way to specify a post format or a custom post type, so this plugin provides a couple ways to update them.
To set the post format, you need to set the category in IFTTT to one of the following categories:
ifttt-aside
ifttt-gallery
ifttt-link
ifttt-image
ifttt-quote
ifttt-status
ifttt-video
ifttt-audio
ifttt-chat
So for my YouTube -> WordPress recipe, I have it adding the ‘ifttt-video’ category in IFTTT (IFTTT allows you to specify the category for the posts it creates), and voilà, when it’s published, the format has been set.
If you want to instead set the new post to a custom post type, you can do so by setting the category in IFTTT to one that matches this pattern: ifttt-posttype-{post_type_slug}. So if you wanted to create new WordPress pages with IFTTT, you would add the ifttt-posttype-page category.
And finally, if you want the IFTTT categories to be stored as a different taxonomy, you can do so by setting the category in IFTTT to one that matches this pattern: ifttt-taxonomy-{taxonomy_slug}.
Note: These speciall ifttt-* categories will not actually be set on the post/page/object. These are ‘special’ categories which simply serve as flags for which post format, post-type or taxonomy to send the data to, and they are removed from the list of categories which are actually stored to the post.
Hope you find this useful!
Feel free to contribute to or fork this plugin on github.
