Wordpress - Show Post Preview when not logged in -
i want set wordpress site show title , first x number of characters/words users not logged in (similar read more option). when click read more sent page says "thank interest... if read more login or register free! [registration form/login].
i understand can hide infromation uses code in page.php or in post list template:
if ( is_user_logged_in() ) { ?> .....content here...... <?php { ?>
and add together code take them registration page message. work if wanted hide content , show title how can utilize while showing specific amount of characters?
you can utilize <?php the_excerpt(); ?>
preview. print trimmed version of content , logged in user <?php the_content(); ?>
wordpress post
No comments:
Post a Comment