947 reputation
116
bio website rainrain.com
location
age
visits member for 1 year, 11 months
seen May 13 at 19:14
stats profile views 42

Aug
10
awarded  Excavator
Aug
10
revised Add Plugins to Wordpress Theme
removed presumed misplaced word, changed 'i' to 'I' in several places
Aug
10
suggested suggested edit on Add Plugins to Wordpress Theme
Aug
8
accepted Can I get the ID of an inserted / linked image?
Aug
2
comment Can I get the ID of an inserted / linked image?
Thanks .... by the way to whoever down-voted it would be helpful to maybe mention why?
Aug
2
asked Can I get the ID of an inserted / linked image?
Aug
2
accepted How to reset post data properly
Aug
2
comment How to reset post data properly
Actually my answer to your question got me thinking and I realised what the problem is. The code was actually fine, it displays the information for the featured image, not the attached image - I forgot I was using get_post_thumbnail_id , and in the other posts there were no featured images. (Yet at the same time I was displaying either featured or attached ; whichever the code found first ) ... when I added featured images to the posts it all worked fine, or at least I know what the problem was.
Aug
2
revised How to reset post data properly
added 62 characters in body
Aug
2
comment How to reset post data properly
I had tried that but it didnt work either. The difference between globalizing $post and not is that when I don't I get the first post's output repeated for every other post and when I do I get a null output for those other posts. Actually I'm going to edit my question a bit because I think I had that wrong in there. The data I am getting is the caption, description and title of the attached image. The context I use it in is that I am calling it from within the look in content-image.php ( image post format )
Aug
2
asked How to reset post data properly
Aug
1
accepted Get first image in a post
Aug
1
comment Get first image in a post
Yes I know I can attach an image without inserting it, that bit is clear ... but I don't see how you can insert an image without attaching it ... when I press upload/insert, upload a file from my computer and press insert into post and update then go to media library library it tells me that the image I uploaded is "attached" to the post ? ... or are we talking semantics here because I understand what you're saying about that bit of code only working for attached images.
Jul
31
comment Get first image in a post
thanks I wasn't sure. Will look at that now
Jul
31
comment Get first image in a post
Theme is to be for sale commercially so I don't want to tell the end user they have to install a plugin, but thanks.
Jul
31
comment Get first image in a post
Yes I've seen that code around ... seems like a bit of a hack, you'd think there'd be a "WordPress" way ... I wonder why I need to use preg_match when the codex says you can do it as I posted above. That's my question really to be honest. Is the code that I posted wrong? ... more-so than trying to get it working really. But thanks I may end up having to use this. I don't understand the significance of "an image just placed in your content can't be set as Featured Image". Does that impact upon this in some way. I am just trying to display the first image from the post, not the featured image.
Jul
31
comment Get first image in a post
Do I have a misunderstanding of what "attached" means exactly? .... I DO have an image in the post ... is it not attached when you click 'add to post'?
Jul
31
asked Get first image in a post
Jul
26
accepted How do I get standard posts to open up in their own template when using get_template_part()?
Jul
26
comment How do I get standard posts to open up in their own template when using get_template_part()?
I missed the fact that there was a single.php file ... when I saw the content-single.php file I jumped to the conclusion that get_post_format() defaulted to 'standard'; ( which would have seemed more intuitive to me; but I'm sure I'll see the logic when I get to use it more) .... but by the looks of it it defaults to false, which is why I think I'll need your suggestion of if ( get_post_format() ) ... etc ... to do what I was trying to do. Thanks