WordPress wp_update_post()
功能出现错误,提示“无效的帖子ID”。这是我的代码:
$current_item = 273;
$my_post = array(
'ID' => $current_item,
'post_title' => 'This is the post title.',
'post_content' => 'This is the updated content.',
);
$post_id = wp_update_post( $my_post, true );
if (is_wp_error($post_id)) {
$errors = $post_id->get_error_messages();
foreach ($errors as $error) {
echo $error;
}
}
Run Code Online (Sandbox Code Playgroud)
提前致谢 。
这是我尝试过的代码
<style>
#example1 {
border: 2px solid red;
background: green;
padding-bottom: 50px;
border-bottom-right-radius: 50%;
border-bottom-left-radius: 50%;
background-position: 50% 50%;
border-top: 0px;
}
</style>
<div id="example1">
<p>test</p>
</div>
Run Code Online (Sandbox Code Playgroud)
这应该必须适用于不同的窗口大小(响应)。背景的宽度也总是 100%。寻求帮助以创建此背景。任何形式的帮助表示赞赏。提前致谢。