Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/258.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

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
强制php读取到Wordpress中的嵌入iframe字段中_Php_Wordpress_Iframe_Shortcode - Fatal编程技术网

强制php读取到Wordpress中的嵌入iframe字段中

强制php读取到Wordpress中的嵌入iframe字段中,php,wordpress,iframe,shortcode,Php,Wordpress,Iframe,Shortcode,在我以前的Wordpress主题中,我有一个特殊的功能,可以在Portofolio帖子的右侧插入带有iFrame的YouTube视频。 但现在,我必须在这里为每个公文包帖子插入一个简单的短码,每个公文包帖子都有一个不同的短码,用于像这样的网络音频播放器[disk_player id=2513] 此代码无法读取,结果是一行简单的文本。此外,短代码的等效php代码不能像这样读取这是右列的代码: <li id="right-column"> <div

在我以前的Wordpress主题中,我有一个特殊的功能,可以在Portofolio帖子的右侧插入带有iFrame的YouTube视频。 但现在,我必须在这里为每个公文包帖子插入一个简单的短码,每个公文包帖子都有一个不同的短码,用于像这样的网络音频播放器[disk_player id=2513]


此代码无法读取,结果是一行简单的文本。此外,短代码的等效php代码不能像这样读取这是右列的代码:

    <li id="right-column">
            <div class="gallery-slider clearfix">

                <?php if(obox_has_video($post->ID)):
                    $args  = array('postid' => $post->ID, 'width' => 660, 'height' => 660, 'hide_href' => true, 'exclude_video' => false, 'imglink' => false, 'wrap' => 'div', 'wrap_class' => 'post-image fitvid');
                    $image = get_obox_media($args);
                    echo $image;
                else : ?>
                    <ul class="gallery-container">
                        <?php $attach_args = array("post_type" => "attachment", "post_parent" => $post->ID, "numberposts" => "-1", "orderby" => "menu_order", "order" => "ASC");
                        $attachments = get_posts($attach_args);
                        foreach($attachments as $attachement => $this_attachment) :  
                            $image = wp_get_attachment_image_src($this_attachment->ID, "660auto");
                            $full = wp_get_attachment_image_src($this_attachment->ID,  "full"); ?>
                            <li>
                                <a href="<?php echo $full[0]; ?>" rel="lightbox">
                                    <img src="<?php echo $image[0]; ?>" alt="<?php echo $this_attachment->post_title; ?>" />
                                </a>
                            </li>
                        <?php endforeach; ?>
                    </ul>
                    <?php if(count($attachments) > 1) : ?>
                        <div class="controls"> 
                            <a href="#" class="next"><?php _e("Next", "ocmx") ?></a> 
                            <a href="#" class="previous"><?php _e("Previous", "ocmx") ?></a>
                        </div> 
                    <?php endif; ?>
                <?php endif; ?>
            </div>
        </li>
主题是第一版:和我的完全不同


谢谢你

你能提供更多关于你提到的特殊功能或你正在使用的主题的信息吗?