Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( ! function_exists( 'x_excerpt_string' ) ) :
- function x_excerpt_string( $more ) {
- if (is_user_logged_in()) {
- return ' <div><a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a></div>';
- }
- else {
- return '<div><a class="more-link" href="' . wp_login_url(get_permalink()) . '">Log in to read more</a></div>';
- }
- }
- add_filter( 'excerpt_more', 'x_excerpt_string' );
- endif;
- if (is_user_logged_in()) {
- query_posts( 'orderby=rand&posts_per_page=1&post_type=card&cat=9' );
- }
- else {
- query_posts( 'orderby=rand&posts_per_page=1&post_type=card&cat=8' );
- }
- <?php if (!is_user_logged_in()) { echo '
- <p>To get access to the whole card deck along with follow-up exercices, please <a href="' . wp_login_url(get_permalink()) . '">log in.</a> If you are not a member, <a href="/members">register for free</a>.'; } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement