Chris Andrews
asked on
Wordpress: wish to open media manager into 'set featured' > 'upload files' by default
So off the post edit screen? Why is clicking on the Add Featured Image link in the meta box not an option here?
ASKER
Hi Jason,
Yes, basically I need that ability (set featured image) but I am using WP Front End Editor:
https://wordpress.org/plugins/wp-front-end-editor/
and it doesn't have a 'set featured image' link.
hmmm... that gives me an idea though....
I've experimented a bit and I see I can add a link to my single.php file that just loads when the editor is active.
I can copy the 'set featured image' from the backend and remake it in the front end. so I end up with a link like this:
http://www.mysite.com/wp-admin/media-upload.php?post_id=20461&type=image&TB_iframe=1 //id set dynamically, of course
Now, if I use that as a link it goes to that page,,, but what I really need it to do is come up as a pop up, rather like it does in the backend.
Should be a way to do that with js, eh?
Yes, basically I need that ability (set featured image) but I am using WP Front End Editor:
https://wordpress.org/plugins/wp-front-end-editor/
and it doesn't have a 'set featured image' link.
hmmm... that gives me an idea though....
I've experimented a bit and I see I can add a link to my single.php file that just loads when the editor is active.
I can copy the 'set featured image' from the backend and remake it in the front end. so I end up with a link like this:
http://www.mysite.com/wp-admin/media-upload.php?post_id=20461&type=image&TB_iframe=1 //id set dynamically, of course
Now, if I use that as a link it goes to that page,,, but what I really need it to do is come up as a pop up, rather like it does in the backend.
Should be a way to do that with js, eh?
ASKER
hmmm, just testing with this;
<a href="http://www.mysite.com/wp-admin/media-upload.php?post_id=<?php the_ID();?>&type=image&TB_ iframe=1"
onclick="return !window.open(this.href, 'Featured', 'width=500,height=500')"
target="_blank">Set featured image</a>
I get a pop-up window (not the nice screen effect like wp has, but it works as a test) and I can upload an image... but it doesn't save it as 'featured', just saves it to the gallery...
Chris
<a href="http://www.mysite.com/wp-admin/media-upload.php?post_id=<?php the_ID();?>&type=image&TB_
onclick="return !window.open(this.href, 'Featured', 'width=500,height=500')"
target="_blank">Set featured image</a>
I get a pop-up window (not the nice screen effect like wp has, but it works as a test) and I can upload an image... but it doesn't save it as 'featured', just saves it to the gallery...
Chris
ASKER
I can figure out the pop up, maybe use a colorbox.
If you can help me figure out how to get the image uploaded that way saved as the featured image, that would be great!
Chris
If you can help me figure out how to get the image uploaded that way saved as the featured image, that would be great!
Chris
ASKER
ohhh... the WP jQuery Colorbox plugin makes a nice effect to bring it up.
Still haven't figured out how to get it to come up and save as a featured image though, it just comes up as the uploader only,
Chris
Still haven't figured out how to get it to come up and save as a featured image though, it just comes up as the uploader only,
Chris
ASKER
hmmm, I took this off the source of the edit/new post page on the backend:
<a title="Set featured image" href="http://www.mysite.com/wp-admin/media-upload.php?post_id=20486&type=image&TB_iframe=1" id="set-post-thumbnail" class="thickbox">Set featured image</a>
and tried that, instead of just using the url.
I get this though:
Instead of the newer version that you get when you click on the link from the backend.
<a title="Set featured image" href="http://www.mysite.com/wp-admin/media-upload.php?post_id=20486&type=image&TB_iframe=1" id="set-post-thumbnail" class="thickbox">Set featured image</a>
and tried that, instead of just using the url.
I get this though:
Instead of the newer version that you get when you click on the link from the backend.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Got it, thank you! I'm going to throw another odd question at you in just a bit here!
Dude, all your questions are odd. Fun, but odd :)
ASKER
:)