How would you recommend adding an image as a custom field in WordPress?

后端 未结 4 1667
孤城傲影
孤城傲影 2021-01-07 13:39

I need to add an image to each page in WordPress. I don\'t wish to insert it using the WYSIWYG editor, I just need the url as a custom field, which I later use in the templa

4条回答
  •  感情败类
    2021-01-07 14:01

    You can use the custom key value fields on posts as well. let's say you always give your images the key 'thumb'. you can then use this code to output them in your post as a thumbnail:

    ”;  ?>
    

提交回复
热议问题