Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.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
Wordpress 在fancybox iframe中打开fancybox图像组_Wordpress_Iframe_Fancybox_Image Gallery_Rel - Fatal编程技术网

Wordpress 在fancybox iframe中打开fancybox图像组

Wordpress 在fancybox iframe中打开fancybox图像组,wordpress,iframe,fancybox,image-gallery,rel,Wordpress,Iframe,Fancybox,Image Gallery,Rel,我有一个Wordpress页面,点击该页面可以链接iframe中打开的帖子页面。在post页面(在iframe中)中,会在fancybox中自动打开图像,但它会在原来的iframe中打开 (这是我的解决方案,如何从帖子页面打开wordpress图像的主页) 但是,当我像这样打开图像时,它是忽略我图像的组( 在我的帖子页面(上传图片的地方): 和后页中的图像: <div id='gallery-1' class='gallery galleryid-110 gallery-columns-3

我有一个Wordpress页面,点击该页面可以链接iframe中打开的帖子页面。在post页面(在iframe中)中,会在fancybox中自动打开图像,但它会在原来的iframe中打开

(这是我的解决方案,如何从帖子页面打开wordpress图像的主页)

但是,当我像这样打开图像时,它是忽略我图像的组( 在我的帖子页面(上传图片的地方):

和后页中的图像:

<div id='gallery-1' class='gallery galleryid-110 gallery-columns-3 gallery-size-thumbnail'><figure class='gallery-item'>
        <div class='gallery-icon fancybox-images landscape'>
            <a href='image-first.jpg'><img width="150" height="150" src="image-first.jpg" class="attachment-thumbnail" alt="Text který se zobrazí" /></a>
        </div></figure><figure class='gallery-item'>
        <div class='gallery-icon fancybox-images landscape'>
            <a href='image-second.jpg'><img width="150" height="150" src="image-second.jpg" class="attachment-thumbnail" alt="defaultní titulek fotky" /></a>
        </div>
            <figcaption class='wp-caption-text gallery-caption'>
            defaultní titulek fotky
            </figcaption></figure><figure class='gallery-item'>
        <div class='gallery-icon fancybox-images landscape'>
            <a href='image-third.jpg'><img width="150" height="150" src="third.jpg" class="attachment-thumbnail" alt="komunikace" /></a>
        </div></figure>
    </div>

弗特莱克·霍特基
当我打开帖子并点击一些图片时,小组工作非常好。我只需要在主页的iframe中使用它。
对不起,我的英语不好。谢谢

检查一下这帮人是否工作正常。谢谢!
        $(".fancybox-post").fancybox({
            openEffect  : 'none',
            closeEffect : 'none',
            iframe : {
                preload: false
            },
            title   : {
                        type: 'none'
                    }

        });
         $(".fancybox-images a").fancybox({
            openEffect  : 'none',
            closeEffect : 'none',
            iframe : {
                preload: false
            },


        });

    $(document).ready(function() {

            $(".fancybox-images a").attr('rel', 'group');


            $('.fancybox-images a').click(function(e){
            e.preventDefault();

            parent.$.fancybox([
                {href:this.href} // Here I think I need some other solution
              ],{
                helpers: {
                    title   : {
                        type: 'outside'
                    },
                    overlay: {
                    opacity: 0.3
                    }}

                }); // fancybox
            }); // click
     });
<div id='gallery-1' class='gallery galleryid-110 gallery-columns-3 gallery-size-thumbnail'><figure class='gallery-item'>
        <div class='gallery-icon fancybox-images landscape'>
            <a href='image-first.jpg'><img width="150" height="150" src="image-first.jpg" class="attachment-thumbnail" alt="Text který se zobrazí" /></a>
        </div></figure><figure class='gallery-item'>
        <div class='gallery-icon fancybox-images landscape'>
            <a href='image-second.jpg'><img width="150" height="150" src="image-second.jpg" class="attachment-thumbnail" alt="defaultní titulek fotky" /></a>
        </div>
            <figcaption class='wp-caption-text gallery-caption'>
            defaultní titulek fotky
            </figcaption></figure><figure class='gallery-item'>
        <div class='gallery-icon fancybox-images landscape'>
            <a href='image-third.jpg'><img width="150" height="150" src="third.jpg" class="attachment-thumbnail" alt="komunikace" /></a>
        </div></figure>
    </div>