whiteout
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: 2.9 custom permalink structureI can confirm that there are still performance issues, just as before.
Forum: Alpha/Beta/RC
In reply to: Adding support for the_post_thumbnail in RSS FeedsActually, it works. It was an error on my side.
Forum: Alpha/Beta/RC
In reply to: Adding support for the_post_thumbnail in RSS FeedsThis is exactly what I was looking for. Inserting the medium sized the_post_thumbnail (if there is one for the post) in the feed.
Last snippet just spits
Warning: Cannot modify header information - headers already sent by (output started at functions.php:3) in feed-rss2.php on line 8right back at me though. πIdeas?
EDIT: Yes, I used SΓ©bastien’s full snippet from http://cdharrison.com/2009/12/the_post_thumbnail-for-rss-feeds/ , no workie. WP v2.9 stable btw.
Forum: Fixing WordPress
In reply to: 2.9 custom permalink structureForum: Alpha/Beta/RC
In reply to: the_post_image not workingThis works.
<?php $img_id = get_post_thumbnail_id();; // orginal image $original_img = wp_get_attachment_image_src ($img_id, 'original'); list($original_src, $original_width, $original_height) = $original_img; // medium image $medium_img = wp_get_attachment_image_src ($img_id, 'medium'); list($medium_src, $medium_width, $medium_height) = $medium_img; // option medium max width $max_width = intval(get_option('medium_size_w')); $begin_a = ''; $end_a = ''; if ($original_width > $max_width) { $begin_a = '<a href="'.$original_src.'">'; $end_a = '</a>'; } ?> <?php echo $begin_a;?><?php the_post_thumbnail( 'medium','class=alignleft' ); ?><?php echo $end_a;?>Forum: Alpha/Beta/RC
In reply to: the_post_image not workingThe 2.9 stable upgrade broke this whole thing for me too π
Tried changing according to squaredesign’s post but it still doesn’t work.This is what it looked like when it worked (before the 2.9 upgrade and before I changed anything):
http://wordpress.pastebin.com/f2eb1728aI upgraded, it didn’t work so I changed it to:
http://wordpress.pastebin.com/f7ecb43c0
and it still doesn’t work.It says:
Fatal error: Call to undefined function has_post_image_id() in C:\Program Files\XAMPPlite\htdocs\wordpress\wp-content\themes\simpleserif\index.php on line 136
line 136 shows:
<?php $img_id = has_post_image_id();All is broken and help would be greatly appreciated.
Forum: Alpha/Beta/RC
In reply to: the_post_image not workingThank you! That is indeed exactly what I was after!
To add <p> and </p> before and after the snippet I tried inserting the <p>s here, but that only applies to the case where the picture uploaded is 500px wide or smaller.
$begin_a = '<p>'; $end_a = '</p>';Sure I could add it to the html, but the best would of course be to only output the <p>s if there is a thumbnail image for the post.
Thank you once again!
Forum: Alpha/Beta/RC
In reply to: the_post_image not workingFairweb, thanks a lot for the help!
I thought this would lead me in the right direction, but I’m not succeeding with what I want to do.I want to output:
<p><a href="originalsize.jpg"><img src"mediumsize.jpg" /></a></p>
using “post image” implemented in WP 2.9.
Preferably (not at all crucial), if the medium image is smaller or has the same size as I’ve set (500 px) in the “Media Settings” under “Image sizes” > “Medium images” only:
<p><img src"mediumsize.jpg" /></p>
has to be output.Looking under “Changing the HTML output of the post image” here might help.
I’ll report back if I find a solution.
Forum: Alpha/Beta/RC
In reply to: the_post_image not workingThanks!
Now I only need to figure out how to output just the url for the original size image (without the <img /> tag).Can’t see to do that with either of the following:
post_image(); get_post_image_id(); the_post_image(); get_the_post_image()Are there more?
Forum: Alpha/Beta/RC
In reply to: the_post_image not workingI wrote “2.9 beta 1” as WP version for this post. Seems to show up as 2.91.
Forum: Themes and Templates
In reply to: Gallery_Shortcode, output only one imageHow future proof would a solution like that be? Is there a chance it would break with the next WordPress version?
Forum: Themes and Templates
In reply to: Gallery_Shortcode, output only one imageI have some classes that should be added to a couple of standard elements to each post. I want the these to be generated automatically. To do this I heavily rely on custom fields for most data. The gallery shortcode would fit in well with this.
Forum: Themes and Templates
In reply to: Gallery_Shortcode, output only one imageI only have a 2.7.1 install to look at at the moment. Are you referring to “Insert into Post” in “Add an Image” > “Media Library”?
Forum: Plugins
In reply to: Viper’s Video Quicktags – 6.03 Shows Preview ImageFor people fighting this problem, <?php wp_head(); ?> is what you need now. <?php wp_footer(); ?> no longer makes any difference.
Forum: Fixing WordPress
In reply to: Advanced (?) use of custom fields and if statements (second try)thank you!