The attachments tag has no wiki summary.
0
votes
1answer
250 views
i want attachment.php to return the image
I use a lightbox to display images from posts in a website that is updated by differents authors.
Or course, the lightbox only works if the author makes sure that he uses link to the image directly ...
0
votes
1answer
1k views
Gel all image from certain post type
I've found similar questions here, however I can't modify the answers to get images only from a certain post type - as the post type in those examples are "attachment" and not the name of a custom ...
0
votes
2answers
930 views
delete post also attachments
I am trying to delete a post with its all attachments. This is the function that i came up with right now;
function remove_post(){
if(isset($_POST['post_id']) && ...
-1
votes
1answer
538 views
Attachment page custom title?
Look what I want to do... I want to edit < title > < /title > from < head > < /head > on attachment page.
Right now I have like this: POST PARENT TITLE (no - or | here ) IMAGE TITLE - MY ...
0
votes
1answer
125 views
get_image_tag filter not working
I'm trying to get the custom field data off an attachment and display it following the image tag in a page/post using the get_image_tag filter.
I'm using the same function to get the same data and ...
3
votes
1answer
2k views
remove links from images using functions.php
I am looking for a way to remove the attachment link from images in the post content.
I would like to add this to the functions.php in my theme. I know you can disable this in the post on a per ...
0
votes
1answer
273 views
How can I rewrite old attachment URLs?
I recently converted my WordPress installation to use SSL on all pages, and now I'm getting mixed content warnings. I've cleaned up everything in my themes and admin pages, but I'm still having ...
0
votes
1answer
332 views
Is it possible to Hook/Filters Attachment Creation?
Is it possible to hook or filter the attachment creation process? More specifically is it possible to hook into the attachment creation so that I may parse the attachment’s filename, populate the ...
2
votes
2answers
4k views
How to get attachment caption (get_the_excerpt gives parent post excerpt) ?
I am displaying the attachments on the parent post page with this code :
$args = array('post_type' => 'attachment', 'post_mime_type' => 'image', 'order'=> 'ASC', 'numberposts' => ...
0
votes
2answers
506 views
How to load previous or next attachment with jquery ?
When i am on the single.php page, i show the first image attachment.
then i would like to load the next (and previous) image attachments without reloading the page.
so in single.php i started with ...
1
vote
2answers
504 views
How can I UN-attach media from a post?
I'm having a trouble un-attaching media from a post without deleting it entirely from my site. Is there a simple way to unattach an image from a post for instance?
5
votes
1answer
301 views
Edit image / Delete image link
There is a function in Wordpress that allows to display a "edit post" link if the user has sufficient rights.
<?php edit_post_link( __( 'Edit' ), '<small class="edit-link">', ...
0
votes
1answer
194 views
Custom field not updating when value is empty
I've added a few custom fields to the WordPress image uploader using the hooks attachment_fields_to_edit and attachment_fields_to_save. Everything works very well, except when a field is erased by the ...
1
vote
1answer
641 views
How to remove attachments size attribute [duplicate]
Possible Duplicate:
Prevent Width and Height Attributes in Image Tag Output
i would like to remove the width="512" height="128" attributes on an attachments
this method is fine on images ...
2
votes
0answers
297 views
Attachment 0×0 size error [closed]
My theme uses 8 different thumbnail sizes. I imported my local installation to the final server using phpmyadmin to export the wordpress database.
Everything is smooth except for the attachments: many ...
1
vote
1answer
399 views
Add custom field to image editor
How do I add custom field to the image editor, such as under the image 'Description' field? To be much clearer, it's where the settings for the images are after you upload an image in the attachment ...
0
votes
1answer
246 views
File Attachment display title in template
I've got a custom post type with a file upload field. In my template file i'm using this to display a link to that file.
<a href="<?php the_field('downloads'); ?>">Download PDF</a>
...
2
votes
4answers
1k views
Change attachment filename
Is there a function that allows me to change the filename of an attachment, based on the Attachment ID I have?
Thanks!
Dennis
1
vote
1answer
640 views
media_sideload_image file name?
I'm using media_sideload_image to download images from the web and store them. However, the problem is that the ones from youtube are always called "hqdefault.jpg", which means that it will override ...
0
votes
1answer
326 views
How to get post id of first child of the same post type?
Is there a function that will let me get the post id of the first child (of the same post type, not attachment)? I could always just run a loop via wp_query but that seems like overkill. :/
The goal ...
0
votes
1answer
144 views
Gallery Thumbnail Layout Template
Is there a way to create a template to display a gallery thumb layout?
Or am I stuck with selecting a thumbnail size and rows in the upload image/gallery area and media settings area?
1
vote
1answer
496 views
List Post Attachments - Remove Image Thumbnails
I'm using the following code to display a list of the posts attachments within a sidebar:
<ul>
<?php $args = array(
'post_type' => 'attachment',
'post_parent' => ...
1
vote
1answer
77 views
media 'path' issue / concern when bringing files live
I'm currently developing a site we have installed on a sub-domain.
'beta.mysite.com'
We will eventually, be moving site to it's root domain.
'www.mysite.com'
Problem?
any post type attachment / the ...
0
votes
1answer
1k views
How to create an attachments archive with working pagination?
This might sound like query_posts with pagination problem number 2103024 but I think this one might be special.
My WordPress site is basically a huge database of car images. Each image should have ...
0
votes
2answers
927 views
Conditional Statement - check if post has an attachment image
I'm working on a conditional statement (in a loop) that looks for a featured image then grabs a default image if there is none, which I have figured out. But, I also wanted a way to pull the first ...
1
vote
1answer
259 views
get_post_meta not working on category.php
I'm referencing an attached image in my header.php page which is displayed as a full screen background on my posts:
global $wp_query;
$page_id = $wp_query->get_queried_object_id();
...
0
votes
1answer
126 views
How to show multiple attachements together with Scribu's Posts 2 Posts connector?
I am using Scribu's Posts 2 Posts plugin to connect posts with small galleries attached to an album post type. Everything works great, except that I cannot figure out how to merge the attachments to ...
0
votes
2answers
2k views
How to access & display images from a post without textual content ( and vice versa) according to best wordpress practices
Looking to create a customized single.php for my posts. In one column I'd like to display all images added through the add media function (inserted into post). In the next column all other content ...
1
vote
2answers
463 views
Display info from custom fields in all images' HTML
Okay, I've been working on this all day and can't find the solution anywhere. I've created a custom field within the image upload screen (info first found here). The field stores the name of a ...
1
vote
1answer
840 views
attachment.php code or tutorial
I am confused about the exact purpose attachment.php ( and image.php) . I notice many themes dont have them. If single.php displays the image the way I want then is it OK to leave it out. On the other ...
1
vote
1answer
202 views
Wordpress adds extra width to post images container boxes
when I insert an image into a post, the <div> that contains that image (and thus any caption) is set to be wider that the image itself.
For example, I have added an image that is 211px wide. ...
0
votes
2answers
2k views
Add image attachment to post via coding?
I tried to add an image as Attachment image to a post.
in wp_postmeta i added _wp_attached_file as meta_key and value = productimages/Routers/v/CISCO1941.jpg
it not works and i could not see the image ...
0
votes
2answers
3k views
Displaying an image's alt title and caption inside a fancybox window. Working, but showing the same alt and caption for each image
I've been at this for hours so maybe someone here can help :)
Basically I have a fancybox gallery that loads images attached to a post. As you can see below, I want to echo either the image's caption ...
0
votes
2answers
703 views
Remove “attachment/” from the URL of attachment pages
Currently, the media for a page on /hello-world/ is shown on /hello-world/attachment/image-name/. Is it possible to remove attachment from this URL, and make it /hello-world/image-name/?
3
votes
3answers
1k views
Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?
Is there a built-in feature or plugin that allows you to attach a document to a post or page such that the actual attachment file is one thing (eg a PDF) but the thumbnail images are another (eg a ...
0
votes
1answer
467 views
Output posts attached images as thumbnails linked to full-size with lightbox class
I'm trying to create a function to be placed in a template page to output the post's attached images. I would like to have the images display as the theme's specified thumbnail size and be linked to ...
0
votes
1answer
102 views
Can i have 2 separate Galleries on 2 separate pages each go to a DIFFERENT Attachment.php file?
I would like to style the attachment page for each gallery differently, but i'm not sure how (sorry for the noob question, i'm still new to wp development!). I was hoping i could use Attachment.php ...
0
votes
2answers
757 views
Insert attachment ID in custom field from media uploader
This is what I want to do:
In the media uploader, add a link "Use this attachment ID as custom field".
Add the attachment ID in a custom fields meta box.
I've searched for hours for a plugin that ...
0
votes
2answers
1k views
Link to full size image or attachment page in photo theme
My site is using WooThemes Statua theme. I'm trying to get my resized slider images to link to their respective full size images (or attachment pages).
I asked a similar question on the WooThemes ...
2
votes
3answers
176 views
Limit amount of results returned
How can I limit the amount of results returned?
$images = $wpdb->get_col("
SELECT ID FROM $wpdb->posts
WHERE post_type = 'attachment'
AND ID in ($meta)
ORDER BY menu_order ASC
...
1
vote
2answers
588 views
How to redirect 'file url' to 'post url' i.e. in attachment.php
I've just started using the attachment.php template on my site. What I'd like to do is redirect all images in posts that used 'file url' to 'post url' and my new attachment.php template.
Is this ...
-1
votes
2answers
100 views
I want to edit documents on my blog without the need to download and upload files again [closed]
Would that be possible?
Basically, I need something which will enable me to edit files directly at the server...
any help would be much appreciated....
0
votes
2answers
555 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,
...
0
votes
1answer
678 views
How to force unlink on attached/inserted images?
When users insert an image into the content, WordPress automatically wraps the image in a hyperlink that, when clicked, creates an "attachment" page showing only the image inside the theme.
Can I ...
2
votes
3answers
1k views
Change image link: wp_get_attachment_link
Can anyone help me filter wp_get_attachment_link so that a particular occurence of it links to the 'medium' or other size image rather than the full size.
I have the following in a page template:
...
0
votes
1answer
181 views
All images on one line for each post
Having trouble getting around the issue where my client wants all of the images for each post to be on one line. This can be done in the editor, but they are not very tech savvy -- just wants to be ...
2
votes
1answer
861 views
Custom function to rearrange attachments when creating posts – Almost there
I'm having some trouble with a custom thing I'm doing.
I've implented a custom image uploader into a metabox in a custom post type.
Now I'm trying to work out a way that will let me reorder the ...
0
votes
1answer
267 views
How to list “invisible” Auto Drafts?
I noticed that when starting to create a new post, and only attach images and then when leavning the post for some reason, it won't show up in the list post view. However when you look in the Media ...
1
vote
3answers
871 views
Control attachments menu order with jQuery Sortable
I've managed create a metabox that lets me upload and then fetch the images and then also been able to add jquery ui sortable to be able to sort the images, however I've no idea how to add actual ...
0
votes
1answer
199 views
add image caption
I would like to add caption to a image I just uploaded through a from. So I have the attachment id and the caption text in a variable.
I found wp_update_attachment_metadata in wordpress codex .. but ...