如何手动将Shadowbox.setup()添加到主题的页脚? [英] How to manually add Shadowbox.setup() to the footer of your theme?

查看:205
本文介绍了如何手动将Shadowbox.setup()添加到主题的页脚?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Wordpress网站,其中有两个版本,一个是全尺寸版本,另一个是用于移动浏览器的版本. 我想关闭用于移动主题的 Shadowbox.JS插件. (我想直接打开图像)

I have a Wordpress website with two versions, one full-sized and one for mobile browsers. I want to shut down the Shadowbox.JS plugin for the mobile theme. (I want images to be opened directly)

我在插件的高级"设置中找到了一些内容.

I've found something in the Advanced settings of the plugin.

跳过设置:对/错.
设置为true可以在Shadowbox.init()期间跳过Shadowbox.setup().对于此插件,您将必须手动将Shadowbox.setup()添加到主题的页脚中.默认为false.

Skip setup: true/false.
Set this true to skip Shadowbox.setup() during Shadowbox.init(). For purposes of this plugin you will have to manually add Shadowbox.setup() to the footer of your theme. Defaults to false.

如何将Shadowbox.setup()手动添加到主题的页脚中?

我的想法是我将其添加到整个主题中,Shadowbox可以使用,但我不会将其添加到移动主题中,并且链接将直接打开图像.

The idea is I will add it to the full theme, and Shadowbox will work, but I won't add it to the mobile theme, and links will open the images directly.

推荐答案

哦.很抱歉打扰您,这可能是某种缓存问题,我不是很彻底.是的,的确是这样:

Oh. Sorry to bother you, it was probably some sort of cache issue, I wasn't very thorough. Yes, indeed:

高级设置>跳过设置= true 完整主题的footer.php

Advanced settings > Skip setup = true footer.php of Full theme

<script type="text/javascript"> Shadowbox.init(); Shadowbox.setup(); </script>

<script type="text/javascript"> Shadowbox.init(); Shadowbox.setup(); </script>

保留Mobile主题的footer.php不变.

leave footer.php of Mobile theme unaltered.

它有效!

这篇关于如何手动将Shadowbox.setup()添加到主题的页脚?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆