Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php WordPress未向我的图像添加标题_Php_Wordpress - Fatal编程技术网

Php WordPress未向我的图像添加标题

Php WordPress未向我的图像添加标题,php,wordpress,Php,Wordpress,我一直试图在我的帖子中添加一个标题,但当我插入图片时,它只是插入图片标签,标题为“alt”,就像这样 <img src="url" alt="the caption" /> 而不是: [caption id="attachment_6" align="alignright" width="300" caption="the caption"]<img src="url" />[/caption] [caption id=“attachment_6”align=“a

我一直试图在我的帖子中添加一个标题,但当我插入图片时,它只是插入图片标签,标题为“alt”,就像这样

<img src="url" alt="the caption" />

而不是:

[caption id="attachment_6" align="alignright" width="300" caption="the caption"]<img src="url" />[/caption]
[caption id=“attachment_6”align=“alignright”width=“300”caption=“the caption”][/caption]
我正在使用最新版本的wordpress和Twenty13主题


提前谢谢。

我想这与你的主题编码有关。尝试使用此短代码: [caption width=“600”caption=“足球视频”][嵌入]http://vimeo.com/14580921[/embed][/caption]

嵌入标题


然后试着切换到默认主题。

我试过了,效果不错。我遇到的问题是让wordpress在插入图像的同时插入快捷码,现在只插入图像。[caption id=“attachment_6”align=“alignright”width=“300”caption=“TheGreat Wave”][/caption]-如果这个不适用于你的主题,但适用于默认主题,那么你需要检查你的主题功能。很明显,这是一种超越。你应该搜索任何有以下文字“img_caption_shortcode”的东西,就像我说的,你给我的代码是有效的。我遇到的问题是,每当我上传图像并给它一个标题,然后我按insert media,wordpress只会将图像标签而不是标题短代码输出到编辑器中。我还检查了一下,以确保media.php文件中包含了短代码,并且它就在那里。但是我在我的函数中找不到任何东西..正如你提到的,它在默认主题中工作-检查你的新主题函数-问题就在那里,你也可以尝试停用所有插件,但我非常确定有什么东西覆盖了你主题中的默认短码。