Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Riley Magnuson

    (@rmagnuson)

    Thanks for the help! Managed to do it like this:

    global $wpdb;
    $query = "SELECT ID, post_title, guid FROM ".$wpdb->posts." WHERE post_content LIKE '%[mod-%' AND post_status = 'publish'";
    $results = $wpdb->get_results ($query);

    Then displayed it like so:
    <?php foreach ( $results as $results ) { ?><p><a>ID;?>"><?php echo $results->post_title;?></a><br></p><?php } ?>

    This will list all pages containing “[mod-” and provide a link to them.

    Thread Starter Riley Magnuson

    (@rmagnuson)

    @catacaustic, How exactly would this be done then on the wordpress database? I can’t seem to find any information on this task

    Thread Starter Riley Magnuson

    (@rmagnuson)

    Thanks for the input all, I managed to end up using this based on your input:

    function mod_myaccount_frame() {
    	
    	//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
    	
    	$opt_name = 'mod_number';
    	$opt_val = get_option( $opt_name );
    	
    	$testvar1 = '<div><iframe id="mainFrame" name="mainFrame" src="https://www.myorderdesk.com/settings.asp?Provider_ID=' . $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>';
    	
    	return $testvar1;
    }
    //shortcode
    add_shortcode( 'mod-myaccount', 'mod_myaccount_frame' );
Viewing 3 replies - 1 through 3 (of 3 total)