WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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" 

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). – qwerty qwerty 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
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

Your Answer


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.