{"id":1328,"date":"2021-12-27T20:00:00","date_gmt":"2021-12-27T20:00:00","guid":{"rendered":"https:\/\/html5-chat.com\/blog\/?p=1328"},"modified":"2021-12-27T23:56:52","modified_gmt":"2021-12-27T23:56:52","slug":"how-to-alternate-news-in-the-chat","status":"publish","type":"post","link":"https:\/\/html5-chat.com\/blog\/how-to-alternate-news-in-the-chat\/","title":{"rendered":"How to alternate news in the chat ?"},"content":{"rendered":"\n<p>News allows you to display special infos in your chat. You can set news at certain date\/time, you can set the interval  and associate a news to a room. <\/p>\n\n\n\n<p>But you could not alternante news: imagine that scenario. You have 3 news whose content is &#8220;Here is news 1&#8221;, &#8220;Here is news 2 &#8220;, &#8220;Here is news 3&#8221; and you would like to display randomly one of these 3 news every 3 minutes.<\/p>\n\n\n\n<p>The solution is to create 1 singe &#8220;big&#8221; news and separate the news with the character |<\/p>\n\n\n\n<p>In our case the content of the news would be: <\/p>\n\n\n\n<p><strong><em>Here is news 1|Here is news 2|Here is news 3<\/em><\/strong><\/p>\n\n\n\n<p>That way the chat will pick up randomly one part (separated by | ) and display it into the chat.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>News allows you to display special infos in your chat. You can set news at certain date\/time, you can set the interval and associate a news to a room. But you could not alternante news: imagine that scenario. You have 3 news whose content is &#8220;Here is news 1&#8221;, &#8220;Here is news 2 &#8220;, &#8220;Here [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1331,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[137],"class_list":["post-1328","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-features","tag-news"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/posts\/1328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/comments?post=1328"}],"version-history":[{"count":1,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/posts\/1328\/revisions"}],"predecessor-version":[{"id":1330,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/posts\/1328\/revisions\/1330"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/media\/1331"}],"wp:attachment":[{"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/media?parent=1328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/categories?post=1328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/tags?post=1328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}