How to create a cumulative posts and members count

Here is a very crude script I’ve knocked up to get what you are after: <?php require(‘wp-blog-header.php’); $posts = get_posts(‘numberposts=-1&order=ASC’); $posts_times = array(); foreach ($posts as $post) { $post_time = strtotime($post->post_date); $offset = $post_time % (60*60*24); $post_time -= $offset; $posts_times[$post_time]++; } $keys = array_keys($posts_times); $running_count = 0; $end_data = array(); for($i = $keys[0]; $i <= … Read more

Registered access area

Ok i solved with this way: // Redirect guest users function login_redirect() { global $pagenow; // If user is not loged in and not in the login page if(!is_user_logged_in() && $pagenow != ‘wp-login.php’) auth_redirect(); } add_action( ‘wp’, ‘login_redirect’ );

Send email to all registered users [closed]

Before you begin, you should know that sending mass emails is a delicate subject matter, and your hosting provider or mail provider has certain guidelines about this. Some hosting providers, such as Dreamhost, provide “Announcement Lists”, which act as a platform for writing newsletters (or essentially emailing a large group of subscribers). Sending unsolicited email … Read more

How can I display show/hide elements when user is registered?

There is no way to do this based on registered vs unregistered status because all users are anonymous until they log in. If you mean “logged in” vs “not logged in” then … if (is_user_logged_in()) { // logged in content } else { // not logged in content } Reference: http://codex.wordpress.org/Function_Reference/is_user_logged_in