Why doesnt my tag page populate with this custom post type?
I’d try to get rid of custom query altogether. Try something like: $attachments = get_posts(array( ‘post_type’ => ‘attachment’, ‘post_parent’ => get_the_ID(), ‘numberposts’ => 1, ));
I’d try to get rid of custom query altogether. Try something like: $attachments = get_posts(array( ‘post_type’ => ‘attachment’, ‘post_parent’ => get_the_ID(), ‘numberposts’ => 1, ));
Looking at your code it looks perfectly fine. Although the more complex you make your query the more resources it is going to take and the longer it is going to take. You mention that your CPU usage rises to 80% which would be normal but how long is the usage holding at 80%? If … Read more
It looks like the original poster has not been around for awhile, but I am working on this same plugin trying to figure out a way to make it usable. The developers have been saying for over a year that they are going to get around to up-dating this plugin, but for now you have … Read more
You can add this to the WHERE clause, just after your filter by post_date: AND post_status = “publish”
You are aware that $wpdb->insert does exactly this? $wpdb->insert( ‘table’, // Table name array( ‘column’ => ‘foo’, ‘field’ => 1337, ), // Columns array( ‘%s’, ‘%d’, ) // Explicit formatting ); Right?
Consider trying with $wpdb->insert() method instead of raw query. Using of functions/methods is recommended for interacting with database over raw requests, unless absolutely impossible.
I nailed it: UPDATE wp_posts as p SET comment_count =(SELECT count(*) FROM `wp_comments` WHERE `comment_post_ID`=p.ID);
Basically you have three parameters here: Current server time Schedule start time Schedule end time Then your task boils down to using custom field parameters in query to request posts with two conditions: schedule start hour is smaller than current hour schedule end hour is larger than current hour
I’ve had this issue before. I stumbled on a really old article from Mark Jaquith on forcing an update. The plugin I’m linking to was originally made to update from 1.5.x to 2.0.x. I was in a bind so I gave it a shot. I did have recent back-ups for my DB so I wasn’t … Read more
You must change the parameters to connect to the database in the file wp-config.php in the root folder of your WordPress installation, or create the same user/password and database name for the database that you have created locally with WAMP. Note: You may have to change the blog_url and every url in the dump that … Read more