0
votes
1answer
20 views

attachment.php & flexslider—linking thumbnail to specific image

I am nearly there but need the help of the community to bring me home! I am linking from a "gallery overview" page (thumbnail grid) to a single, full-size image page (attachment.php) containing a ...
0
votes
1answer
92 views

Change attachment inside the_content using filters

I am in search of a snippet or function that will filter the embedded images inside a post to a custom size I have defined in functions.php. Here is the scenario: A client uploads and add any ...
0
votes
1answer
128 views

How can i catch (with get_posts) attachment file (pdf, images) from a post when i have only inserted it from media library and it isn't upload for it?

I'm sorry for my english. I discover a strange behavior in WP get_posts when i try to detect from a post an attachment (in my case a pdf file) inserted from the library. This is my code: ...
0
votes
1answer
103 views

Retreive tags from attached post for media on page

I am working on a custom template file that pulls all images in my Media Library with a specific tag. I was able to get this working with some help from the community, it also shows the title of the ...
0
votes
1answer
389 views

Get title of post image is attached to

So I found this post: Find the post an attachment is attached to and implemented Chip's suggestion but having a weird outcome. I am trying to pull the title of the post that the specific image is ...
0
votes
1answer
127 views

Bulk Attach Or Insert Media To Post Without Opening Post Editor

How to create a custom panel inside wp admin dashboard where we can insert media to specified posts in bulk? Here is the illustration: As shown on the image above, it list all available media on ...
0
votes
1answer
430 views

Retrieve Image Attachments Getting Post Thumbnail Image First

I have written a funtion to get post image attachments, is there any way of ordering these images such that the first is always the post_thumbnail? Code below Thanks John function ...
2
votes
1answer
607 views

Get attachments (get_posts) and WP 3.5 new uploader

I'm using get_posts() to get attachments from the post and use it in the slider. The issue is new uploader doesn't have that "Gallery" tab which was perfectly suitable for this. It also seems to be ...
0
votes
2answers
481 views

Can't sort get_posts by post_mime_type

I'm trying to run a query to get all attachments and I'd like to sort by the post mime type. This query isn't working. Any ideas? $query_args = array( 'post_type' => 'attachment', 'numberposts' ...
1
vote
1answer
423 views

Exclude images from “inserted into post” when trying to get attachments

I have here the coin-slider which takes all pictures from the gallery. I get the attachments through the following code: $attachments = get_posts(array('post_type' => 'attachment', 'post_parent' ...
4
votes
3answers
537 views

List most recent image uploads, but only for specific custom post type

I can get a list of the most recent image attachments like so: $attachments = get_posts( array( 'post_type' => 'attachment', 'posts_per_page' => $number, 'post_mime_type' => ...
0
votes
2answers
839 views

attachments with tags and get_posts

having problems with filtering a posts attachments by tag... It worked fine until i added the tag__in arg (and other variations of it). $vidArgs = array( 'tag__in' =>5, ...
5
votes
1answer
8k views

How to get attachment file name not attachment URL

I'm using this code to list the image attachments of a post: <select name="chb_homes_for_sale_specifics_floor_plan" style="width:100%;"> <option ...
1
vote
1answer
505 views

get post attachment using ajax

I'm developing a plugin and I'm trying to get the url's from a post's attachments with ajax. If the user is on a single.php page. After some seconds, I'm sending an Ajax request, getting all the ...