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

问题描述 投票:0回答:1

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

amy_temaplates.php这是第209行的代码

$post->the_permalink = get_permalink($post->id);

这是完整的代码

    $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;
    }
php wordpress
1个回答
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 );
        }

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

© www.soinside.com 2019 - 2024. All rights reserved.