Hello world 2

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

rying to insert content before the post content in my functions.php – I know how to use the regular wp hooks, but unsure how to insert into other areas.

Tried this, but it kills content on any other post type:

function property_slideshow( $content ) {
 if ( is_single() && 'property' == get_post_type() ) {
    $custom_content = '[portfolio_slideshow]';
    $custom_content .= $content;
    return $custom_content;
    } 
}
add_filter( 'the_content', 'property_slideshow' );

How do I make this conditional?

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です