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

Jquery in IE, fully messed up

After a long debugging, I found that the class .nivoSlider was not having a definite height, so I gave a height height:288px !important; and woila, it worked,

Editing wordpress dashboard

What exactly do you mean by editing? I hope not modifying WP core files, which is considered bad practice and incompatible with updates? Administration menus are considered to be some of the most nasty parts of code in WP and are hard to deal with. For some top level overview see Administration Menus in Codex, … Read more

How to list first (etc. 5) posts as new?

This is pretty easy. //Include this above your loop $i = 0; //Counter if(have_posts())while(have_posts())the_post(); //include this in your loop $i++; if($i <= 5) echo “<img src=”http://urltoinewimage” alt=”Image Title” />”; //Stop including in your loop the_title(); the_content(); endwhile; else: endif;

wordpress featured image

The most simple form of the featured images (post thumbnails) looks like this: You need to have this piece of code in your functions.php file: add_theme_support( ‘post-thumbnails’ ); Then in the index.php, or any other template file you want to show the post thumb or featured images, you would add this: <?php the_post_thumbnail( ‘thumbnail’ ); … Read more

WordPress HTML editor panel is not showing HTML elements

You can switch back and forth between the editors as much as you want. But the <p></p> tags usually don’t show up in the HTML edit view unless there’s special styling applied to the paragraph (i.e. font size, color, alignment). Let’s say you have the following in the HTML editor: Lorem ipsum dolor sit amet, … Read more

Cannot upload themes. Error: “The uploaded file could not be moved to /var/www/wp-uploads/localhost/2011/10.”

From quick search of source for this error message, it is likely to be triggered by failed move_uploaded_file() function call, which is native PHP and not WordPress. Documentation says that it has some restrictions, related to safe_mode and open_basedir so that might be your issue. Since WP suppresses error output from this function with @ … Read more