$ window.height未定义.问题出在哪儿?
FoodSearchControllers.controller('homeCtrl', ['$scope', '$http', '$window', 'filterArgs', function($scope, $http, $window, filterArgs) {
$scope.popupHeight = $window.height;
console.log($scope.popupHeight);
}]);
Run Code Online (Sandbox Code Playgroud) 我有一个带有costum img尺寸(固定宽度和高度)的WP滑块,我需要它们可以缩放到固定的330px高度和自动宽度.怎么实现这个?
先感谢您!
我正在为用户添加/编辑他们的帖子制作前端管理员.我已经发布了添加表单并且它有效,但编辑表单不起作用.
的functions.php
function add_new_post( $post_id )
{
if( $post_id == 'new' ) {
// Create a new post
$post = array(
'post_title' => $_POST["fields"]['field_52c810cb44c7a'],
'post_category' => array(4),
'post_status' => 'draft',
'post_type' => 'post'
);
// insert the post
$post_id = wp_insert_post( $post );
return $post_id;
}
else {
return $post_id;
}
}add_filter('acf/pre_save_post' , 'add_new_post' );
Run Code Online (Sandbox Code Playgroud)
的index.php
<div id="updateform-<?php the_ID(); ?>" class="collapse">
<?php
echo get_the_ID();
$args = array(
'post_id' => get_the_ID(), // post id to get field groups from and save …Run Code Online (Sandbox Code Playgroud)