GG资源网

WordPress Image Gallerys的自定义HTML只输出一半的功能

问题描述:

I took the following code from an example and adjusted it so a standard gallery in wordpress would output as a Flexslider and Carousel. I can output one of them just fine, but I added additional *outputs for a Carousel as well, and now only the Carousel prints out. Any help on how I can get the whole thing to output would be appreciated

}

the html that gets outputed so far (it doesn\'t output the #sliding div, only the #carousel):

网友观点:

You have a few errors, that I can see.

If you wish to append data, you need to put a period . before your equals = like this .= on the second $output assignment. Anytime you are appending but not putting .= after the variable name, you are basically reassigning it a new value instead of adding to it.

Also change this line:

$output = \\\"<div id=\\\\\"carousel\\\\\" class=\\\\\"flexslider flexslider--post-content-carousel\\\\\">
\\\";

to:

$output .= \\\"<div id=\\\\\"carousel\\\\\" class=\\\\\"flexslider flexslider--post-content-carousel\\\\\">
\\\";

The problem lies in the fact that you were basically resetting the variable with a new output instead of appending the data to it.

Hope this helps you.

Be sure to go through your code and double check variable assignments to make sure you are appending rather than resetting.

###

You have two errors in your code, that lies in following lines:

You are resetting $output variable two times, thus what was written to it before is lost, so you should replace them with:

由于网站搬家,部分链接失效,如无法下载,请联系站长!谢谢支持!
1. 带 [亲测] 说明源码已经被站长亲测过!
2. 下载后的源码请在24小时内删除,仅供学习用途!
3. 分享目的仅供大家学习和交流,请不要用于商业用途!
4. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
5. 本站所有资源来源于站长上传和网络,如有侵权请邮件联系站长!
6. 没带 [亲测] 代表站长时间紧促,站长会保持每天更新 [亲测] 源码 !
7. 盗版ripro用户购买ripro美化无担保,若设置不成功/不生效我们不支持退款!
8. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
9. 如果你也有好源码或者教程,可以到审核区发布,分享有金币奖励和额外收入!
10.如果您购买了某个产品,而我们还没来得及更新,请联系站长或留言催更,谢谢理解 !
GG资源网 » WordPress Image Gallerys的自定义HTML只输出一半的功能

发表回复

CAPTCHAis initialing...