在wordpress中插入b站视频的代码

在这里插入图片描述
在嵌入代码的后面加上:

 style="width: 100%; height: 500px; max-width: 100%;align:center; padding:20px 0;

也就是

<iframe src="//player.bilibili.com/player.html?aid=928620141&amp;bvid=这里替换成自己的视频地址id号&amp;cid=277141946&amp;page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" style="width: 100%; height: 500px; max-width: 100%;align:center; padding:20px 0;"> </iframe>

这样能在文章页铺满显示

阿里云服务器优惠活动及详细教程:syunz.com/act/aliyun
腾讯云服务器优惠活动及详细教程:syunz.com/act/qcloud

  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
以下是一个简单的示例代码,可以用于在WordPress创建自定义登录和注册页面。您可以将此代码添加到您的主题的functions.php文件,或者使用自定义插件来实现。 ``` // 创建自定义登录页面 function custom_login_page() { // 获取登录页面的URL $login_url = wp_login_url(); // 输出自定义HTML代码 echo '<div class="custom-login-page">'; echo '<h2>自定义登录页面</h2>'; echo '<form name="loginform" id="loginform" action="' . $login_url . '" method="post">'; echo '<p>'; echo '<label for="user_login">用户名</label>'; echo '<input type="text" name="log" id="user_login" class="input" value="" size="20" />'; echo '</p>'; echo '<p>'; echo '<label for="user_pass">密码</label>'; echo '<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" />'; echo '</p>'; echo '<p class="submit">'; echo '<input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="登录" />'; echo '</p>'; echo '</form>'; echo '</div>'; } add_shortcode( 'custom-login-page', 'custom_login_page' ); // 创建自定义注册页面 function custom_register_page() { // 获取注册页面的URL $register_url = wp_registration_url(); // 输出自定义HTML代码 echo '<div class="custom-register-page">'; echo '<h2>自定义注册页面</h2>'; echo '<form name="registerform" id="registerform" action="' . $register_url . '" method="post">'; echo '<p>'; echo '<label for="user_login">用户名</label>'; echo '<input type="text" name="user_login" id="user_login" class="input" value="" size="20" />'; echo '</p>'; echo '<p>'; echo '<label for="user_email">电子邮件</label>'; echo '<input type="email" name="user_email" id="user_email" class="input" value="" size="20" />'; echo '</p>'; echo '<p class="submit">'; echo '<input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="注册" />'; echo '</p>'; echo '</form>'; echo '</div>'; } add_shortcode( 'custom-register-page', 'custom_register_page' ); ``` 这段代码创建了两个短代码:custom-login-page和custom-register-page。这些短代码将输出自定义HTML代码,包括登录和注册表单。您可以在WordPress使用这些短代码来显示自定义登录和注册页面。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值