echo same menu items across multi-site platform

Sorry this should be a comment –> you should be able to use a switch to blog http://codex.wordpress.org/Function_Reference/switch_to_blog This will allow you to grab the main blog ID, from there you can use a WP list pages or a http://codex.wordpress.org/Function_Reference/wp_nav_menu to display the menu of your main site on the other blogs within the network

Responsive Video Max-width

So, apparently, I needed to read a little bit more before I posted my question. After I posted the question, I ran across: https://moodle.org/mod/forum/discuss.php?d=258650, which is what I incorporated into the code I was using. I modified my function to look like: function video_embed( $html ) { return ‘<div class=”video-container”><div class=”video-wrap”>’ . $html . ‘</div></div>’; … Read more

Allow iframes from specific sites?

I’d register an embed handler with wp_embed_register_handler. This gives you the added benefit of being able to just copy and paste the url into the editor as well as seeing a preview of the iframe. add_action( ‘init’, ‘se238330_register_embed_handler’ ); function se238330_register_embed_handler() { wp_embed_register_handler( ‘joetek’, ‘#http://subdomain.yourdomain\.com/(.+)/?#i’, ‘wp_embed_handler_joetek’ ); } function wp_embed_handler_embed_name( $matches, $attr, $url, $rawattr ) … Read more

metabox wordpress show in frontend

The output is escaped, so it will not display html, try this : just save the value of the src attribute <iframe src=”<?php echo esc_attr__( get_post_meta( get_the_ID(), ‘name’, true ) ); ?>” width=”670″ height=”500″>

Embed Post in external page

Prerequisite: Custom Plugin First you’ll need a small plugin. Just copypaste it into a .php file, add it to some folder, zip and upload it to your installation an you’re done. What it does This small plugin only checks if the wpembed query part is present and if it is set to true. If both … Read more

Check if page is embeded

The server doesn’t know what the client is doing with the output and as such, you’re limited in what you can assume. You may or may not have params sent in the request, referer, current uri and headers. $_REQUEST[’embed_act’] $_SERVER[‘HTTP_REFERER’] $_SERVER[‘REQUEST_URI’] get_headers() On the JS side, it might be possible. if(self==top) { //… } if( … Read more

How to save iframe tag into a post?

iframes get stripped out for security reasons, you shouldn’t be trying to put embed codes directly into post content, there are other methods, such as oembed or shortcodes. If you have the unfiltered_html capability, you can add them via the classic editor, but this capability is extremely dangerous. It also means any users who don’t … Read more

VB.net and WordPress

So I’m wondering if anyone might know how I could use VB.net for my calculators on my WordPress website. Directly? No, you can’t run .Net in a browser, and the closest available is silverlight and activeX, both of which were discontinued. As I understand it, the problem is that VB.net doesn’t run on an Apache … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)