Force php reading into an embed iframe field in WordPress

In my old WordPress theme I’ve a special function that allow to insert a YouTube video with iFrame in the right side of Portofolio Posts.
But now I’ve to insert into this place (for each portfolio posts) a simple shortcode (different for each portfolio post) for a web audio player like this [disk_player id="2513"] .

This code cannot be read and it results as a simple line of text. Also the equivalent php code for the shortcode cannot be read (like this <?php echo do_shortcode('[disk_player id="2513"]'); ?>.

Read More

I’ve also tried to add [raw] ... [/raw] tags before and after code but it doesn’t work.

Can you help me to force the reading of the shortcode in this field?

Big thanks to everyone.
P

Related posts

Leave a Reply

1 comment

  1. This is the code of right column:

        <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>
    

    And the theme is the 1st version of this: http://demo.oboxsites.com/retail-therapy/ (really different from mine).

    Thank you