Insert all post IDs in new database table
Like so: INSERT INTO $mytable (post_id) SELECT ID FROM $wpdb->posts as posts LEFT JOIN $mytable as dup_check ON dup_check.post_id = posts.ID WHERE dup_check.post_id IS NULL;
Like so: INSERT INTO $mytable (post_id) SELECT ID FROM $wpdb->posts as posts LEFT JOIN $mytable as dup_check ON dup_check.post_id = posts.ID WHERE dup_check.post_id IS NULL;
function is_php4(){ return version_compare(phpversion(),’5′,'<‘); }
I’m not certain, but if you’re talking about $_post as seen here: http://codex.wordpress.org/Function_Reference/in_category It’s referring to a post ID so they’ve probably added the underscore to avoid confusion. The $post variable is a post object with all the details of the post. However, $_POST is a global PHP variable containing all the values sent from … Read more
Build the links yourself: $terms = get_the_terms($post->ID, ‘trpropcity’); if($terms) foreach($terms as $term) echo ‘<a href=”‘.get_term_link($term, ‘trpropcity’).'”>’.ucwords(strtolower($term->name)).'</a>’;
I think it depends on whether you want it to be unique for each of the four “highlighted” project columns on the homepage, or whether you want each “highlighted project” to be different. Does that make sense? E.g. if you just want each of the four project “columns” on the homepage to look different then … Read more
OK, All-in-one-SEO pack was interfering with my decalration. Solved.
Try logging into the mysql instance from the command line by typing in mysql -u root -p and then entering your mysql root password. If you can connect, even if it rejects your username and password, you know it’s up and running correctly. From that point you can diagnose whether it is username/password issues or … Read more
The options are being output within the loop, so are being repeated for each iteration of the loop. To check within the loop and only output something on the first iteration: while ( have_posts() ) : the_post(); if( $wp_query->current_post == 0 ): // this is the first post // output your options endif; // other … Read more
Not the same as what you want, but perhaps this plugin might be of some help? WordPress Hook Sniffer
Passing the page ID to a login php script