简体   繁体   English

动态添加新闻到提要

[英]Dynamically adding news to feed

I'm running a Wordpress website and I have a <marquee> on the front page that runs the news. 我正在运行一个Wordpress网站,并且在运行新闻的首页上有一个<marquee>

Is it possible to have it dynamically generate the news? 是否有可能动态生成新闻? What do I mean by that? 那是什么意思

Would it be possible to make it so that whenever a new post is made with a category of "News", it will automatically be fed into the <marquee> on the front page, along with the five older news posts, such that the six most recent news posts are being <marqueed> in the front page, and so that the user doesn't have to go into the html code to manually add in entries. 是否有可能做到这一点,以便每当有新类别为“新闻”的帖子发布时,它就会自动与五个旧新闻帖子一起送入首页的<marquee> ,例如六个最新新闻帖子在首页被<marqueed> ,因此用户不必进入html代码即可手动添加条目。

Is this too far out of reach? 这太遥不可及吗? Any thoughts? 有什么想法吗?

Thanks! 谢谢!

Amit 阿米特

Actually, if I think about it in simple terms, it seems like this can be an easy task to accomplish, no? 实际上,如果我简单地考虑一下,这似乎是一件容易完成的任务,不是吗?

Just have a loop showing posts with the category of news on the front page and wrap that up with a <marquee> tag. 只需在首页上循环显示带有新闻类别的帖子,然后用<marquee>标签将其包裹起来即可。 I think that should work. 我认为应该可以。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM