Custom comment type maybe?

I also (ab?)use comments for “private” replies to posts, like product inquiries, suggestions, answers to contests, … The advantage is that they are stored in the database and displayed in the interface without extra code from me (sometimes I add a filter to improve the formatting). Spam filtering and e-mail notifications are easy extras. I … Read more

Plugin for changing a post’s category based on it’s post date?

Don’t know of a plugin but you can use wp_schedule_single_event function. First create a meta box that takes to values: time for removal and what category we want to set it to when removed from featured. /* hook meta box */ add_action(“admin_init”, “admin_init”); /* hook meta box function */ function admin_init(){ add_meta_box(“Featured Removal”, “Featured Removal”, … Read more

Can Not Redirect from Plugin-Registered Admin Page

You can’t redirect to another page, because WordPress has already rendered admin header and sidebar templates. If you really wish to redirect users to another page, you need to do it earlier, before header and sidebar are rendered. You can use action of following structure to redirect to another page: load-{parent_page_slug}_page_{plugin_subpage_slug} The full snippet: define( … Read more

How to select featured images for 1500 posts?

You can run a script that will programmatically set the featured image for each post. You can use the first attached image for this. To get the attached images run a query for the posts and loop through each one and use get_children() setting the post_parent to the current post id in your loop. $posts … Read more

Missing argument 2 for wpdb::prepare() Issue

That was not exactly change in code, that was change to better inform people they are not using the method correctly. In line with wpdb documentation you need to properly pass values, or they won’t be properly escaped in query. In your case it would turn into something like: $wpdb->prepare(“SELECT id, name FROM %s”, $table_name) … Read more