WordPress converts media extention URL automatically to video player

You should consider using the Auto-embeds Disabler plugin here: https://gist.github.com/ocean90/3796628 Note that it’s actually just a single line of code, if you prefer to add that to your functions.php – but I’d suggest keeping it as a plugin so you can easily activate/deactivate that functionality. remove_filter( ‘the_content’, array( $GLOBALS[‘wp_embed’], ‘autoembed’ ), 8 ); Note that … Read more

How to apply an ID to Shortcode Embedded iframe

1.- Add this to your child theme’s functions file: add_filter(“embed_oembed_html”, function( $html, $url, $attr ) { if ( !empty( $attr[‘id’] ) ) { $html = str_replace( “<iframe”, sprintf( ‘<iframe id=”%s”‘, $attr[‘id’] ), $html ); } return $html; }, 10, 3); 2.- Now use ‘ ); Hope that helps.

Embedding custom posts with REST API

Your endpoint is wrong, /wp/v2/posts is just for objects with post_type=”post”. If your custom post type is registered with ‘activity-api’ the endpoint would be /wp/v2/activity-api/11. That’s because it’s the slug you registered in ‘rest_base’ => ‘activity-api’ argument to your post type. Without a custom rest_base argument, the endpoint would be at /wp/v2/st_activity

Changing the default object embed sizes?

This is what I crafted to override the defaults, I set a default media width, choose an aspect ratio (16:9) and then replace the video shortcode output. $defaultMediaWidth = 960; if ( ! isset( $content_width ) ) { $content_width = $defaultMediaWidth; } add_filter( ’embed_defaults’, ‘bigger_embed_size’); function bigger_embed_size() { global $content_width; $width = $content_width; // aspect … Read more

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