Skip to content

Instantly share code, notes, and snippets.

@ximosa
Last active November 30, 2016 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ximosa/3d09e5291f9e720af7aaefbf13912b0e to your computer and use it in GitHub Desktop.
Save ximosa/3d09e5291f9e720af7aaefbf13912b0e to your computer and use it in GitHub Desktop.
PAGINA SOLO PARA USUARIOS
<?php
/**
* Template Name: Loguin-wp
*/
get_header(); ?>
<div class="tu clase css">
<div class="tu clase css">
<main class="tu clase css">
<?php if ( is_user_logged_in() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'template-parts/content', 'page' ); ?>
<?php endwhile; // end of the loop. ?>
<?php else : ?>
<p><?php _e( 'Tienes que iniciar sesión para ver el contenido de esta página.'); ?></p>
<p><?php wp_login_form(); ?></p>
<p><a href="<?php echo wp_lostpassword_url( get_permalink() ); ?>"><?php esc_html_e( 'Recuerdas tu password?' ); ?></a></p>
<?php endif; // End logged in check. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment