0
現在、私はWordpress用のギャラリープラグインを開発しています。ユーザーにギャラリーの位置を選択するオプションを提供したいと思います(the_contentの前後)。the_content(wordpress)の前にコードを挿入する
現在、私はこのようなthe_contentに引っ掛けることで、コンテンツの後にそれを置くことに成功した:
function add_post_content($content) {
if ('gallery' == get_post_type() && is_single()) {
$content .= gallery_frontend();
$content .= gallery_map_display();
}
if ('gallery' == get_post_type() && is_archive()) {
// archive functions here
}
return $content;
}
add_filter('the_content', 'add_post_content');
は、それが後の代わりにthe_contentの前に表示するように取得する方法はありますか?
ありがとうm8、魅力的な作品です!ときにはそれはちょうど奇妙です:それは簡単にできる:-) –
偉大なので、あなたの質問に答えますか? –
ええ、確かに:)ありがとう! –