amy_templates.php第209行遇到非数字值

时间:2017-12-18 17:34:13

标签: php wordpress

警告:第206行/customers/3/3/f/mabox-ks.com/httpd.www/web1/wp-content/plugins/ab_ct_amy_slider/inc/amy_templates.php中遇到非数字值< / p>

amy_temaplates.php 这是第209行的代码

    $post->the_permalink = get_permalink($post->id);
        global $product;
        if(isset( $product)){
            $post->get_price_html = $product->get_price_html(); 
            $post->get_rating_html = $product->get_rating_html(); 
            $post->the_permalink = get_permalink($post->id);
            $post->add_to_cart_url = $product->add_to_cart_url();
            $post->get_sku = $product->get_sku(); 
            $post->is_purchasable = $product->is_purchasable() ? 'add_to_cart_button' : ''; 
            $post->product_type = $product->product_type;
            $post->add_to_cart_text = $product->add_to_cart_text(); 
            $post->get_categories = $product->get_categories( ', ', '<span class="posted_in">' . _n( 'Category:', 'Categories:', sizeof( get_the_terms( $post->id, 'product_cat' ) ), 'woocommerce' ) . ' ', '.</span>' );                              
        }
        $posts[] = $post;
    }

这是complet代码

viewDidLoad

1 个答案:

答案 0 :(得分:0)

我已经制作了这样的代码我刚刚添加//

                $post->custom_max_width =  get_post_meta( get_the_ID(), 'custom_amy_slide_max_width', true );
        //    $post->custom_margin = $post->custom_max_width/2*-1;
            $post->shortcodes_custom_css = get_post_meta( get_the_ID(), '_wpb_shortcodes_custom_css', true );
        }

它有效。谢谢你,无论如何