Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have just purchased a theme called HQ Photography from themeforest which has a custom post type called gallery.

I can add images from my hard drive no problem - but if I click the media tab and select an image the 'Insert into post button' is missing

I found a site which suggested I needed to add a custom filter to functions.php

add_filter('get_media_item_args', 'force_send_to_post'); 

function force_send_to_post($vars) { 
    $vars['send'] = true; // 'send' as in "Send to Editor" 
    return($vars); 
}

This brings the button back but the button then does nothing.

Does anyone one know what could be wrong?

UPDATE: It seams the above function does work! - however only for images that are 'unattached' - once an image has been 'attached' the insert into post does nothing

Can you attach images to multiple posts?

share|improve this question
    
Is there in your theme looks like "media_send_to_editor" ? (I belive best in this case will be contact theme author and ask him what's going on). –  Oleg Butuzov Nov 18 '12 at 9:54
    
I guess im looking in javascript for this? or PHP? –  Rob Nov 18 '12 at 10:07
    
Think I'd be happy to pay someone to fix this for me... –  Rob Nov 18 '12 at 14:43
add comment

1 Answer

up vote 1 down vote accepted

It seems like theme author disabled this fuctionality for certian post type's attachments, for a reason. Trying to get it back could very well break something else. Try contacting theme's author. (S)he will probably provide free support.

share|improve this answer
    
I found this plugin wordpress.org/support/view/plugin-reviews/duplicate-images - which allows you to 'attach' existing images to my custom post types - tested it and it seams to work ok –  Rob Nov 18 '12 at 15:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.