解決Youtube在WP上,只能使用4:3的比例問題
安裝外掛 Embed Plus for YouTube
安裝啟用後,在選單會增加「Youtube Free」功能,打開後在第 1 頁的設定畫面,下方找到「Responsive Video Sizing:」,將此功能打勾就可以了喔。

打勾之後,所有 Youtube 影片就會自動縮放。
安裝外掛 Embed Plus for YouTube
安裝啟用後,在選單會增加「Youtube Free」功能,打開後在第 1 頁的設定畫面,下方找到「Responsive Video Sizing:」,將此功能打勾就可以了喔。
打勾之後,所有 Youtube 影片就會自動縮放。
Astra : Use content-blog.php (template-parts/content-blog.php) , Add below wording
<?php
/**
* Template part for displaying posts.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Astra
* @since 1.0.0
*/
?>
<?php astra_entry_before(); ?>
<article
<?php
echo astra_attr(
'article-blog',
array(
'id' => 'post-' . get_the_id(),
'class' => join( ' ', get_post_class() ),
)
);
?>
>
<?php astra_entry_top(); ?>
<strong><U><?php edit_post_link(__('編輯文章')); ?> </U></strong>
<?php $url = get_bloginfo('url'); if (current_user_can('edit_post', $post->ID)){ echo '<a class="delete-post" href="'; echo wp_nonce_url("$url/wp-admin/post.php?action=delete&post=$id", 'delete-post_' . $post->ID); echo '"><strong> | <U>删除文章</U></strong></a>'; } ?>
<?php astra_entry_content_blog(); ?>
<?php astra_entry_bottom(); ?>
</article><!-- #post-## -->
<?php astra_entry_after(); ?>
Astra: Use content-single.php (template-parts/content-single.php) , Add below wording
<?php
/**
* Template part for displaying single posts.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Astra
* @since 1.0.0
*/
?>
<?php astra_entry_before(); ?>
<article
<?php
echo astra_attr(
'article-single',
array(
'id' => 'post-' . get_the_id(),
'class' => join( ' ', get_post_class() ),
)
);
?>
>
<?php astra_entry_top(); ?>
<strong><U><?php edit_post_link(__('編輯文章')); ?> </U></strong>
<?php $url = get_bloginfo('url'); if (current_user_can('edit_post', $post->ID)){ echo '<a class="delete-post" href="'; echo wp_nonce_url("$url/wp-admin/post.php?action=delete&post=$id", 'delete-post_' . $post->ID); echo '"><strong> | <U>删除文章</U></strong></a>'; } ?>
<?php astra_entry_content_single(); ?>
<?php astra_entry_bottom(); ?>
</article><!-- #post-## -->
<?php astra_entry_after(); ?>