doufeng9567 2019-07-29 02:31
浏览 224

Wordpress:在将页面编辑为HTML时,有没有办法使用PHP代码?

I have a wordpress page that have a section that was written as HTML code. But I would like to call some php function inside that HTML. Is that posible? When I tried to do that, the PHP code was ignored. The reason I want to use the PHP code is to call an image that is in my template folder.

If that is not the case, Is there a way to call an image from the wordpress uploads using HTML code when I'm editing a page?

  • 写回答

1条回答 默认 最新

  • dongshan9338 2019-07-29 03:55
    关注

    Simply use image tag and image url and embed it in html

    <img src="https://websitename.com/wp-content/uploads/2019/03/banner_1.png">
    

    You can get image link by clicking media in wordpress get link.

    评论

报告相同问题?

悬赏问题

  • ¥100 求数学坐标画圆以及直线的算法
  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决