How to make my new theme read [youtube id=”id of the video here” width=”600″ height=”350″]?

You can for example: Copy the YouTube shortcode from the old theme to your new theme. Locate the line (most likely in the functions.php file): add_shortcode( ‘youtube’, ‘some_function’ ); and copy this line and the some_function() to your functions.php in your new theme or better yet – create a new plugin file including: /*Plugin Name: … Read more

How To Display Content from a website on wordpress page?

Although CURL requests will work, you should use wp_remote_post() to do requests to external pages, especially if you are writing a plugin or theme. (Plugin review doesn’t like CURL requests; they will ask you to convert to wp_remote_post(). See https://codex.wordpress.org/Function_Reference/wp_remote_post . The return value includes the header and all content of the request. You can … Read more

How to Implement Responsive YouTube Video Framing? [closed]

Make the media query for <iframe> responsive. Set an id to <iframe>and set max-width and min-width, and give specific size to this <iframe> on different device widths. CSS: <style> @media screen and (max-width: 400px) { #res{ width:200px; height:200px; } } </style> HTML: <iframe id=”res” src=”https://www.youtube.com/embed/rL66iCVZ6mE?rel=0&amp;controls=0&amp;showinfo=0″ frameborder=”0″ allowfullscreen></iframe>`

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