これにはいくつかの原因が考えられる:
1) プラグインのCSSファイルがページに読み込まれていない。
ウェブページを右クリックし、「ソースの表示」を選択することで確認できます。CSSファイルがページのヘッダーに読み込まれているかどうかを確認できます。このように表示されるはずです:
<link rel=’stylesheet’ id=’cff-css’ href=’http://yourwebsite.com/wp-content/plugins/custom-facebook-feed-pro/css/cff-style.css’ type=’text/css’ media=’all’ />
If it isn’t there then it’s most likely that your theme doesn’t have the WordPress wp_head() function in it’s header.php file. This function is required by plugins in order to include plugin CSS files in your page. To add this function to your theme simply open your theme’s header.php file and add the following before the closing </head> tag:
<?php wp_head(); ?>
2) Facebookフィードに適用されるCSSが、テーマまたは他のプラグインに含まれている。
プラグインはテーマのCSSを継承するように設計されており、テーマのスタイルシートにある特定のCSSが書式設定に小さな問題を引き起こすことがあります。問題の原因がわからない場合は、サポートまでお問い合わせください。
3) テーマによっては、WordPressのデフォルト機能をオーバーライドする独自のコンテンツフォーマット機能を使用しているため、プラグインのフォーマットで問題が発生することがあります。
以下のように、[custom-facebook-feed]ショートコードを[raw]ショートコードでラップしてみてください:
[raw][custom-facebook-feed][/raw]。
それでも問題が解決しない場合は、テーマのfunctions.phpファイルに以下を追加し、ショートコードをもう一度[raw]タグで囲んでみてください:
function cff_formatter($content) {
$new_content = '';
$pattern_full = '{(\[raw\].*?\[/raw\])}is';
$pattern_contents = '{\[raw\](.*?)\[/raw\]}is';
$pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);
foreach ($pieces as $piece) {
if (preg_match($pattern_contents, $piece, $matches)) {
$new_content .= $matches[1];
} else {
$new_content .= wptexturize(wpautop($piece));
}
}
return $new_content;
}
remove_filter('the_content', 'wpautop');
remove_filter('the_content', 'wptexturize');
add_filter('widget_text', 'do_shortcode');
add_filter('widget_text', 'cff_formatter', 99);
add_filter('the_content', 'cff_formatter', 99);
それでも問題が解決しない場合は、以下のJavaScriptをサイトに 追加してみてください。これはカスタムJavaScriptプラグインを使用して手動で行うことができます。詳しくは こちら.
$('#cff p').each(function(){
if($(this).html().length < 2) $(this).remove();
});