triffid
Forum Replies Created
-
Forum: Plugins
In reply to: Is there a hook for the edit link form?I’ve just realised I can do what I need to do through the meta box system.
Forum: Fixing WordPress
In reply to: Page template panel missingNevermind, my theme had somehow been deactivated (but only in the admin panel!?).
Forum: Fixing WordPress
In reply to: get_posts with post_parent returns empty arrayNevermind, I needed to set
post_type
topage
as it defaults topost
even ifpost_parent
is set.Forum: Plugins
In reply to: [Plugin: WP Super Cache] Forcing A Recache Due To Third Party PluginTry calling
wp_cache_post_change($post_id)
.Forum: Fixing WordPress
In reply to: I need Help trying to figure out what this code meansSee this support forum thread. It looks like you might need to update the Google Sitemap plugin.
Forum: Fixing WordPress
In reply to: Installed plugin and now I cannot loginAre you getting an error message? If so what?
Forum: Fixing WordPress
In reply to: I need Help trying to figure out what this code meansHave you recently upgraded to WordPress 2.3? It might be that you have a plugin installed which hasn’t been updated for the new terms tables in 2.3.
Forum: Fixing WordPress
In reply to: How to get IDs of child pages in 2.0.10?So, ‘post-type’ isn’t used in 2.0.10, I should have used ‘post-status=static’.
Forum: Fixing WordPress
In reply to: How to determine which years there are posts for in a category?Well, after staring at the taxonomy schema for half an hour I managed to put together the following query which seems to do what I need.
SELECT DISTINCT YEAR($wpdb->posts.post_date) FROM $wpdb->posts, $wpdb->terms, $wpdb->term_taxonomy, $wpdb->term_relationships WHERE $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_type = 'post' AND $wpdb->terms.term_id = 3 AND $wpdb->terms.term_id = $wpdb->term_taxonomy.term_id AND $wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id AND $wpdb->term_relationships.object_id = $wpdb->posts.ID ORDER BY $wpdb->posts.post_date DESC
Perhaps someone who knows more about MySQL than me (and that would not be difficult) could tell me if this is a bad idea or not…
Forum: Fixing WordPress
In reply to: Can this PHP be edited to display categories?I’d guess you (haven’t and) need to change the ‘path/to/wp-blog-header.php’ in Whooami’s example to the actual path to that file in your WordPress installation.
Forum: Fixing WordPress
In reply to: Can this PHP be edited to display categories?I don’t know much about MySQL, but can you not just add a ‘post_category’ condition to your select?
Forum: Fixing WordPress
In reply to: Show post_categoryIts probably too late to help you, but for anyone else trying to do this the following select works. An array of objects is returned from which you need the ‘category_id’ property.
$wpdb->get_results("SELECT * FROM $wpdb->post2cat WHERE post_ID = $post->ID ORDER BY category_ID");
Forum: Fixing WordPress
In reply to: How can I put my pages in my sidebar?It depends on your template. But, you’ll probably find a similar piece of code in your navigation bar php file (or in ‘header.php’) which you can remove.
Forum: Fixing WordPress
In reply to: How to add a search tool to sidebar?Well, you might try (if you haven’t already) copying the ‘searchform.php’ file from the default theme folder to the folder your theme is in.
Forum: Fixing WordPress
In reply to: WP inserts paragraph close tag after self closed image tagWell, I’ve just added the following line to the wpautop function for now. If anyone can suggest a better solution that would be really helpful.
$pee = preg_replace('|(<[^p]*>\s?<img[^>]*\s/>)</p>|','$1', $pee);