创建另一个“特色图片”选择器wordpress

时间:2022-06-18 06:07:08

I already have a Featured Image picker on my Wordpress that chooses the image to be shown on the front page of my site. BUT, I want another image picker just like the featured image picker because I would like the authors to easily choose a image that should be shown at the top of the article.

我的Wordpress上已经有一个精选图片选择器,用于选择要在我网站首页上显示的图像。但是,我想要另一个图像选择器就像特色图像选择器一样,因为我希望作者能够轻松选择应该在文章顶部显示的图像。

The reason for this is that I want to show an ad after the title, excerpt and a second image. And this second image needs to be chosen somehow, and the best way is to do it the same way as a featured image.

这样做的原因是我希望在标题,摘录和第二张图片后显示广告。并且需要以某种方式选择第二个图像,最好的方法是以与特色图像相同的方式进行。

But, I dont know where to begin with creatin such an "widget" for the "New post"-editor.

但是,我不知道在哪里开始使用creatin这样的“小部件”为“新帖子”编辑。

I know both HTML, CSS og PHP, so the programming aint a barrier, I just dont know where to start.

我知道HTML,CSS和PHP,所以编程不是障碍,我只是不知道从哪里开始。

Best regards, Markus

最好的问候,马库斯

1 个解决方案

#1


1  

There is a WordPress plugin to create multiple featured images, if you would like to go the plugin route. However, I might recommend creating a custom post type, which would allow you to specifically add a secondary image to your post under the title of "Advertisement" or something along those lines. The programming isn't difficult and there are many great tutorials available on the subject.

如果你想进入插件路线,有一个WordPress插件可以创建多个特色图像。但是,我可能会建议您创建一个自定义帖子类型,这样您就可以在“广告”标题下或者某些内容中专门为帖子添加次要图像。编程并不困难,有很多关于这个主题的优秀教程。

#1


1  

There is a WordPress plugin to create multiple featured images, if you would like to go the plugin route. However, I might recommend creating a custom post type, which would allow you to specifically add a secondary image to your post under the title of "Advertisement" or something along those lines. The programming isn't difficult and there are many great tutorials available on the subject.

如果你想进入插件路线,有一个WordPress插件可以创建多个特色图像。但是,我可能会建议您创建一个自定义帖子类型,这样您就可以在“广告”标题下或者某些内容中专门为帖子添加次要图像。编程并不困难,有很多关于这个主题的优秀教程。