2016-06-29 11 views
0

ウェブサイトで1年以上プラグインを使用していますが、何らかの理由でショートコードがプレーンテキストとして出力されているため、実際にショートコード自体が表示されています。ショートコードは製品スライダを生成するはずです。WordPressのショートコードをプレーンテキストとして表示

問題のプラグインです:WPB WooCommerce製品スライダー

のウェブサイトは次のとおりです。https://londontopsoilcompany.co.uk/

ページ全体をショートコードを含むWYWYGエディタ内で作成されました。残念ながら、私はプラグインを無効にして、競合が発生しているかどうかを確認することはできません。

私はすべてWeb上で探している、私はthatsのは、プラグインwitihn含まshortcodes.phpファイルをチェックアウトしなかったと私はそこに見ることができます:

add_shortcode('wpb-latest-product', 'wpb_wps_shortcode'); 

if(!function_exists('wpb_wps_shortcode')): 
    function wpb_wps_shortcode($atts){ 
     extract(shortcode_atts(array(
      'title' => __('Latest Products','wpb-wps'), 
     ), $atts)); 

     $return_string = '<div class="wpb_slider_area wpb_fix_cart">'; 
     $return_string .= '<h3 class="wpb_area_title">'.$title.'</h3>'; 
     $return_string .= '<div id="wpb-wps-latest" class="wpb-wps-wrapper owl-carousel '.wpb_ez_get_option("wpb_slider_type_gen_lat", "wpb_wps_style", "grid cs-style-3").'">'; 

     $args = array(
      'post_type'   => 'product', 
      'posts_per_page' => wpb_ez_get_option('wpb_num_pro', 'wpb_wps_general', 12) 
     ); 

     $loop = new WP_Query($args); 

     if ($loop->have_posts()) { 
      while ($loop->have_posts()) : $loop->the_post(); 
       global $post, $product; 
       $return_string .= '<div class="item">'; 
       $return_string .= '<figure>';   
       $return_string .= '<a href="'.get_permalink().'" class="wpb_pro_img_url">'; 
       if (has_post_thumbnail($loop->post->ID)){ 
        $return_string .= get_the_post_thumbnail($loop->post->ID, 'shop_catalog', array('class' => "wpb_pro_img")); 
       }else{ 
        $return_string .= '<img id="place_holder_thm" src="'.woocommerce_placeholder_img_src().'" alt="Placeholder" />'; 
       } 
       $return_string .='</a>'; 
       $return_string .='<figcaption>'; 
       $return_string .='<h3 class="pro_title">'; 
       if (strlen($post->post_title) > 20) { 
        $return_string .= substr(the_title($before = '', $after = '', FALSE), 0, wpb_ez_get_option('wpb_title_mx_ch', 'wpb_wps_style', 10)) . '...'; 
       }else{ 
        $return_string .= get_the_title(); 
       } 
       $return_string .='</h3>'; 
       if($price_html = $product->get_price_html()){ 
        $return_string .='<div class="pro_price_area">'. $price_html .'</div>'; 
       } 
       $return_string .= '<div class="wpb_wps_cart_button"><a href="'.esc_url($product->add_to_cart_url()).'" rel="nofollow" data-product_id="'.esc_attr($product->id).'" data-product_sku="'.esc_attr($product->get_sku()).'" data-quantity="'.esc_attr(isset($quantity) ? $quantity : 1).'" class="button '. ($product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : '') .' product_type_'.esc_attr($product->product_type).'">'.esc_html($product->add_to_cart_text()).'</a></div>'; 
       $return_string .='</figcaption>'; 
       $return_string .= '</figure>'; 
       $return_string .= '</div>'; 
      endwhile; 
     } else { 
      echo __('No products found','wpb-wps'); 
     } 
     wp_reset_postdata(); 
     $return_string .= '</div>'; 
     $return_string .= '</div>'; 
     wp_reset_query(); 
     return $return_string; 
    } 
endif; 

私が使用しているショートが[wpb-latest-product title=”Latest Product”]

です

誰かがこれに遭遇したのを見ていますか?または、そのような問題を診断する最善のステップは何か。

また、「ビジュアル」タブではなく「テキスト」タブでショートコードを追加しようとしましたが、効果がありませんでした。

答えて

1

私は、唯一のショートチェックを支援するあなたのエラーデータ完全ではないので、this link

を確認することができます
関連する問題