Chris Harrison
Forum Replies Created
-
Forum: Alpha/Beta/RC
In reply to: 2.9 beta 2 “Upgrade WordPress Database” Does NothingWhat version of MySQL are you running? 2.9 requires MySQL 4.1.2 or greater (old requirement was 4.0)
Forum: Alpha/Beta/RC
In reply to: Adding support for the_post_thumbnail in RSS FeedsA better approach:
function insertThumbnailRSS($content) { global $post; if ( has_post_thumbnail( $post->ID ) ){ $content = '<p>' . get_the_post_thumbnail( $post->ID, 'medium' ) . '</p>' . $content; } return $content; }
Special thanks to: Sébastien Méric
Forum: Alpha/Beta/RC
In reply to: Adding support for the_post_thumbnail in RSS FeedsI wasn’t aware
the_content_rss
was being deprecated in 2.9. Here’s an updated snippet:function insertThumbnailRSS($content) { $content = '<p>' .the_post_thumbnail('medium'). '</p>' .$content; return $content; } add_filter('the_excerpt_rss', 'insertThumbnailRSS'); add_filter('the_content_feed', 'insertThumbnailRSS');
There may be better way of doing this – see https://cdharrison.com/2009/12/the_post_thumbnail-for-rss-feeds/#comment-15583 , but it broke when I tried to implement it. If anyone has a better idea, I’d love to hear it.
(I’m running WordPress 2.9 Release Candidate 1.)
Forum: Fixing WordPress
In reply to: How to style WP 2.7 threaded commentsRegarding the original topic for this thread… here are some additional WordPress 2.7 Comment Style Starters you can use… Hope it helps!
Forum: Fixing WordPress
In reply to: How to style WP 2.7 threaded commentsI’ll post some additional designs to get folks started by this weekend. I know what I’ve posted can definitely be improved upon.
Forum: Fixing WordPress
In reply to: How to style WP 2.7 threaded comments<ins>I posted about this on my site: Stylizing Threaded/Nested Comments in WordPress 2.7</ins>
Here’s the structure for ol.commentlist so far… (I’m sure I’m missing something here, but this should be the meat of it.)
- ol.commentlist {}
- ol.commentlist li {}
- ol.commentlist li.alt {}
- ol.commentlist li.bypostauthor {}
- ol.commentlist li.byuser {}
- ol.commentlist li.comment-author-admin {}
- ol.commentlist li.comment {}
- ol.commentlist li.comment div.comment-author {}
- ol.commentlist li.comment div.vcard {}
- ol.commentlist li.comment div.vcard cite.fn {}
- ol.commentlist li.comment div.vcard cite.fn a.url {}
- ol.commentlist li.comment div.vcard img.avatar {}
- ol.commentlist li.comment div.vcard img.avatar-32 {}
- ol.commentlist li.comment div.vcard img.photo {}
- ol.commentlist li.comment div.vcard span.says {}
- ol.commentlist li.comment div.commentmetadata {}
- ol.commentlist li.comment div.comment-meta {}
- ol.commentlist li.comment div.comment-meta a {}
- ol.commentlist li.comment {} – (p, em, strong, blockquote, ul, ol, etc.)
- ol.commentlist li.comment div.reply {}
- ol.commentlist li.comment div.reply a {}
- ol.commentlist li.comment ul.children {}
- ol.commentlist li.comment ul.children li {}
- ol.commentlist li.comment ul.children li.alt {}
- ol.commentlist li.comment ul.children li.bypostauthor {}
- ol.commentlist li.comment ul.children li.byuser {}
- ol.commentlist li.comment ul.children li.comment {}
- ol.commentlist li.comment ul.children li.comment-author-admin {}
- ol.commentlist li.comment ul.children li.depth-2 {}
- ol.commentlist li.comment ul.children li.depth-3 {}
- ol.commentlist li.comment ul.children li.depth-4 {}
- ol.commentlist li.comment ul.children li.depth-5 {}
- ol.commentlist li.comment ul.children li.odd {}
- ol.commentlist li.even {}
- ol.commentlist li.odd {}
- ol.commentlist li.parent {}
- ol.commentlist li.thread-alt {}
- ol.commentlist li.thread-even {}
- ol.commentlist li.thread-odd {}
It needs some work, but hopefully this will help to get you started. Here is some of the CSS I am using on my site [Example]:
ol.commentlist { list-style:none; margin:0 0 1em; padding:0; text-indent:0; } ol.commentlist li { } ol.commentlist li.alt { } ol.commentlist li.bypostauthor {} ol.commentlist li.byuser {} ol.commentlist li.comment-author-admin {} ol.commentlist li.comment { border-bottom:1px dotted #666; padding:1em; } ol.commentlist li.comment div.comment-author {} ol.commentlist li.comment div.vcard { font:normal 16px georgia,times,serif; } ol.commentlist li.comment div.vcard cite.fn { font-style:normal; } ol.commentlist li.comment div.vcard cite.fn a.url {} ol.commentlist li.comment div.vcard img.avatar { border:5px solid #ccc; float:right; margin:0 0 1em 1em; } ol.commentlist li.comment div.vcard img.avatar-32 {} ol.commentlist li.comment div.vcard img.photo {} ol.commentlist li.comment div.vcard span.says {} ol.commentlist li.comment div.commentmetadata {} ol.commentlist li.comment div.comment-meta { font-size:9px; } ol.commentlist li.comment div.comment-meta a { color:#ccc; } ol.commentlist li.comment p { font-size:11px; margin:0 0 1em; } ol.commentlist li.comment ul { font-size:11px; list-style:square; margin:0 0 1em 2em; } ol.commentlist li.comment div.reply { font-size:11px; } ol.commentlist li.comment div.reply a { font-weight:bold; } ol.commentlist li.comment ul.children { list-style:none; margin:1em 0 0; text-indent:0; } ol.commentlist li.comment ul.children li {} ol.commentlist li.comment ul.children li.alt {} ol.commentlist li.comment ul.children li.bypostauthor {} ol.commentlist li.comment ul.children li.byuser {} ol.commentlist li.comment ul.children li.comment {} ol.commentlist li.comment ul.children li.comment-author-admin {} ol.commentlist li.comment ul.children li.depth-2 { border-left:5px solid #555; margin:0 0 .25em .25em; } ol.commentlist li.comment ul.children li.depth-3 { border-left:5px solid #999; margin:0 0 .25em .25em; } ol.commentlist li.comment ul.children li.depth-4 { border-left:5px solid #bbb; margin:0 0 .25em .25em; } ol.commentlist li.comment ul.children li.depth-5 {} ol.commentlist li.comment ul.children li.odd {} ol.commentlist li.even { background:#fff; } ol.commentlist li.odd { background:#f6f6f6; } ol.commentlist li.parent { border-left:5px solid #111; } ol.commentlist li.thread-alt { } ol.commentlist li.thread-even {} ol.commentlist li.thread-odd {}
Forum: Fixing WordPress
In reply to: Importing Comment RSS Dump into WordPressOut of curiosity, did you ever find a solution for this?
Forum: Themes and Templates
In reply to: Print Parent page titleI’ve been wondering this myself. I just found this article and it works like a charm!
https://expatrick.com/2007/04/14/wordpress-name-of-parent-page/
<?php if (is_page()) { if (!empty($post->post_parent)) { $extradata = $wpdb->get_row("select post_title from wp_posts where ID = " . $post->post_parent); echo $extradata->post_title; } else { echo $post->post_title; } } else { echo "your text here"; } ?>