Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter animecut

    (@animecut)

    Thanks. Works great.

    One more thing, how would I display the username of the latest registered user?

    Thread Starter animecut

    (@animecut)

    I’m not using plugins to secure the pages, i’m using this code (and then for the pages I want restricted to logged in users, I just make them use that as the basis of their template).

    <?php if (is_user_logged_in()) {
    // code to display the page goes here

    if (have_posts()) : while (have_posts()) : the_post();

    echo”

    <div class=’entry’>

    “;

    the_content(‘<p class=”serif”>Read the rest of this page »</p>’);

    wp_link_pages(array(‘before’ => ‘<p>Pages: ‘, ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’));

    echo “</div>”;

    endwhile; endif;

    echo””;
    edit_post_link(‘Edit this entry.’, ‘<p>’, ‘</p>’);

    echo”</div>

    </div>”;

    } else {
    echo”<div class=’top’>AnimeCut > Access Denied</div>”;
    // code to say “you must be logged in to see this page” goes here
    echo”Error: You must login to your account to access this page.If you do not have an account, you can register one here. </div></div>”;
    }

    ?>

    Thread Starter animecut

    (@animecut)

    How would I code that (i’m not very good at php)? At the moment, i’m using a custom template file for my pages that require the user to be logged in.

Viewing 3 replies - 1 through 3 (of 3 total)