Display iFrame exactly where shortcode is placed
-
I have run into a bug with my plugin that is set to display a set of HTML and PHP where the shortcode is placed.
Basically, I want all the code I have placed inside of my function to display where I put the shortcode, however with my current setup, it’s displaying at the very top of the content section on a page, and I can’t find a way to adjust it.
This is the code I’m using now:
function mod_myaccount_frame() { ?> <div> <iframe id="mainFrame" name="mainFrame" src="https://www.myorderdesk.com/settings.asp?Provider_ID=<?php echo $opt_val; ?>" scrolling="no" allowtransparency="true" style="border:0px solid gray; background-color:transparent; width:100%; height:1600px" onload="window.parent.parent.scrollTo(0,0)"></iframe> </div> <?php //Enqueue the iframe stylization wp_enqueue_script( 'mod_frameresizer', plugins_url( 'Resources/iframeresizer.min.js' , __FILE__), $in_footer = true ); //Calls the resize code wp_enqueue_script( 'mod_frameresizer1', plugins_url( 'Resources/MODSkinService.js' , __FILE__), $in_footer = true ); //Calls the mod skin code wp_enqueue_script( 'mod_frameresizer2', plugins_url( 'Resources/ifrzsk.js' , __FILE__), $in_footer = true ); //Runs the resize and skin code ?> <?php } add_shortcode( 'mod-myaccount', 'mod_myaccount_frame' );
How can I get the div and iframe code to be inserted exactly where the shortcode was put?
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Display iFrame exactly where shortcode is placed’ is closed to new replies.