尝试使用背景大小的CSS规则缩小图像但似乎在Firefox 3.5中被忽略
CSS
.privatejoker {
background: aqua url("../styles/images/home-privatejoker.png") no-repeat 0 0;
background-size: 365px 341px;
height:341px;
margin: 0 auto;
display:block;
margin-top: -6px;
}
Run Code Online (Sandbox Code Playgroud) 有没有办法在Wordpress中设置受密码保护的帖子?另外,我似乎只能保护此而不是任何自定义字段.
编辑 - 尽可能避免使用插件
沟通有点棘手,但希望这是有道理的.
我有8个div容器,需要使用Jquery用额外的div包装所有偶数,这样的效果如此,
<div id="wrapper">
<div id="content">
</div></div>
<div id="content">
</div>
<div id="wrapper">
<div id="content">
</div></div>
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用我的functions.php中的以下代码在Wordpress中设置受密码保护的帖子.它给了我一个'找不到页面'并重定向到'wp-pass.php'网址.关于如何绕过它的任何想法将非常感激.
<?php add_filter( 'the_password_form', 'custom_password_form' );
function custom_password_form() {
global $post;
$label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
$o = '<form class="protected-post-form" action="' . get_option('siteurl') . '/wp-pass.php" method="post">
' . __( "" ) . '
<label for="' . $label . '">' . __( "Password Protected" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" /><input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" />
</form>
';
return $o;
}
?>
Run Code Online (Sandbox Code Playgroud)