用按钮加载wordpress简码吗? [英] Load wordpress shortcode with a button?
问题描述
问题:
是否可以按需加载WordPress短代码,例如有一个按钮?
Is it possible to load a WordPress shortcode on demand, e.g. with a button?
说明:
我有一个Gallery插件,它有一个简码.不幸的是,该插件在页面加载时不使用图像延迟机制.因此它有太多的图像请求会影响速度排名.
I have a gallery plugin, it has a shortcode. Unfortunately, the plugin does NOT use image defer mechanism on page load. So it has too many image requests that hurt speed ranking.
这可能吗?
我想要一个加载图库"按钮.按下时,将加载画廊简码.欢迎任何建议/文章/关键概念.我什至不知道从哪里开始.
I want a "load gallery" button. When it's pressed, the gallery shortcode is loaded. Any recommendation / article / key concepts is welcomed. I don't even know where to start.
推荐答案
您可以将自定义按钮添加到编辑器-> https://codex.wordpress.org/TinyMCE_Custom_Buttons
You can add custom buttons to the editor -> https://codex.wordpress.org/TinyMCE_Custom_Buttons
这篇关于用按钮加载wordpress简码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!