The Unique theme has both a most viewed and most commented widget, which has options for displaying by year, month, day, or all-time.
It also supports all 9 post formats, two of which allow you to set both “video” and “image” posts.
home.php is for the posts page. It is not to be used for any other purpose than to show the latest blog posts.
To do what you want though, you must use front-page.php. It will always overwrite what’s shown on the front page of the site regardless of reading settings. If you take this route, the user only has to go to Settings > Reading to create a blog page (i.e., the posts page) if they choose to have one.
Of course, this is usually not a good idea for public themes (it’s good for client themes though). The theme shouldn’t dictate what’s shown on the front of the site, which is the purpose of front-page.php. I’d go with a custom page template instead to give users more flexibility. Yeah, it means more steps, but I’ve never had a user complain in the past 5 years of doing it this way.
There are studies that both talk about the healthy and unhealthy aspects of coffee. You’ll find plenty of info with a Google search. I consider anything that is addicting unhealthy though.
More than anything, it’s probably not the coffee that’s the really bad thing. It’s all the crap people add into their coffee that is.
My question: Assuming coffee is healthy, does it offer any additional benefits that you cannot get from a nutritionally-sound diet? That’s the way I look at it.
I love coffee, but I typically only drink it as a fun drink once in a while. I drink water 99% of the time though. I keep my energy levels high by eating a variety of plant foods, getting adequate rest, and keeping a regular exercise routine.
This is probably a bit more than what you wanted, but here’s a breakdown of all the things you need to fix other than what’s already been mentioned.
For the wpt_events_date() function:
I’m assuming you’re properly adding the meta box via add_meta_box(). Doing so will pass the $post object directly to your function as the first parameter, so there’s no need for the global $post.
You should use the wp_nonce_field() function to create your nonce input instead of hardcoding the HTML for it.
You need to escape the $month and $date variables before adding them as an attribute for your input boxes.
I’d also prefix your name attributes instead of using eventmeta_nonce, _month, and _date in the inputs. Use a unique prefix like wpt_. I’d make sure all things going to $_POST are prefixed so there’s less risk of conflicts with anyone else’s code.
For the wpt_save_events_meta() function:
Use $post_id instead of $post->ID. No biggie, but you already have the data there in variable form.
You should check the edit_post_meta, add_post_meta, and/or delete_post_meta capabilities rather than the edit_post capability. Plus, a hardcoded edit_post is technically wrong; you’d need to use the post type object to check the actual capability, which might be different. But, you don’t need that cap. You need the post meta caps.
All $_POST data should be sanitized/validated before sending it to the database. The month should be sanitized to make sure it’s a one-/two-number value. The date should go through the same process to make sure it’s both the type of data you want and in the correct format.
There’s no need for worrying if the data is an array because a user won’t be passing you an array through a text input box. Nevertheless, with proper validation/sanitization, you wouldn’t need to worry about that anyway.
If you’re going to check if the post type is a revision, it should be done before your foreach loop.
Your if/else and if checks in your foreach loop should be if/elseif/elseif instead.
templattica said
greenshady saidYeah, because authors live in future and they just come here to make themes for 5 versions in advance…
Message to buyers: If you get an error when updating your theme, it most likely means your theme author done something wrong. You should not need to get confirmation from your theme author that it’s okay to update your copy of WordPress.Seriously, if something is made to work on 3.4 and when you bought it, it never said it’ll work with future versions, you don’t come here crying and go all-caps rage on authors because your template doesn’t work after you updated WP without even bothering to find out whether the template is compatible with latest version of WP or not. Though I don’t know how goes this whole migration thing with WP, but this was generally speaking…
I’ve coded themes for WordPress 2.3 that still work to this day with WordPress 3.5. I’ve been doing this thing a lot longer than most people here, so don’t feed me some line about not living in the future.
WordPress builds in backwards compatibility for everything. It also properly deprecates functions so that authors have many, many versions to update their code.
If your theme is properly coded, it will not break when WordPress updates. That’s why we have standards set in place to avoid this sort of problem.
neruda said
I was just wondering what kind of conflicts might arise so I know what to look for in case I run into trouble?
You shouldn’t run into any conflicts if your theme was properly coded.
Message to buyers: If you get an error when updating your theme, it most likely means your theme author done something wrong. You should not need to get confirmation from your theme author that it’s okay to update your copy of WordPress.
There aren’t 10 companies that offer true development frameworks. There’s a bunch of companies with themes that they call frameworks though.
Here’s one for you that you most definitely can use commercially: http://themehybrid.com/hybrid-core Also, check out this page: http://codex.wordpress.org/Theme_FrameworksI could’ve sworn I posted this earlier. I guess it didn’t go through.
But, here’s my framework, which is used by many theme companies and freelancers: http://themehybrid.com/hybrid-coreThe one and only theme I’ve uploaded here doesn’t support IE8 . It may work, but I’m not sure how it looks in IE8 because I’ve never checked it. I personally only support two versions of IE at any given time with my themes and those are currently IE9 and IE10 .
What’s the point of the checkboxes of supported browsers if support is required when uploading a theme here on TF?
Also, the stats the OP posted earlier are way off based on other stats I’ve seen.

Seriously, if something is made to work on 3.4 and when you bought it, it never said it’ll work with future versions, you don’t come here crying and go all-caps rage on authors because your template doesn’t work after you updated WP without even bothering to find out whether the template is compatible with latest version of WP or not. Though I don’t know how goes this whole migration thing with WP, but this was generally speaking…