animecut
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Display number of registered users?Thanks. Works great.
One more thing, how would I display the username of the latest registered user?
Forum: Fixing WordPress
In reply to: Treating googlebot as a registered wordpress user?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 hereif (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>”;
}?>
Forum: Fixing WordPress
In reply to: Treating googlebot as a registered wordpress user?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.