The attachments tag has no wiki summary.
0
votes
0answers
17 views
wp insert attachment from local drive [duplicate]
Is there some way to upload images from local drive to posts without using dashboard.
Something like function wp_insert_attachment, bur for that function is a rule that files must be on server.
1
vote
1answer
78 views
Show how many images are attached to a post/page on compose page
On the front-end, I'm using a query to show all attachments attached to the current post. However, on the compose page, there's no way for a user to see how many images are attached without opening up ...
0
votes
1answer
183 views
wp_get_attachment_link() add rel attribute if the link points to direct image
I'm using filter like this to add rel attribute in wp_get_attachment_link()
add_filter( 'wp_get_attachment_link', 'sant_prettyadd');
function sant_prettyadd ($content) {
$content = ...
1
vote
1answer
59 views
How To Grab All Type Of Attachments, But Images?
I need to get all file attachments which is not an image,
'post_mime_type' only accepts "any" or specific mime types,
How to grab all type of attachments, but images?
0
votes
1answer
62 views
Add audio attachment link to RSS
This is how I'm adding a featured image to my RSS:
function featuredtoRSS($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = '' . get_the_post_thumbnail( $post->ID, ...
0
votes
1answer
203 views
After changing permalink structure, How to redirect attachment url to old parent post url
I change my permalink structure successfully.
/%year%/%monthnum%/%postname%/ --> /%category%/%postname%/%post_id%/
But now I face a problem. Before change my permalink, I redirect my ...
0
votes
5answers
264 views
Timthumb alternative [closed]
I want to generate resized images on the fly. Basically I'm creating a plugin that allows the user to set a default image that gets displayed on the front end. He also has an option to change the size ...
0
votes
1answer
121 views
Problem attaching image to a wpec product
I'm having a problem with WordPress not finding all products (wp ecommerce) but just variations of products when you attempt to attach an image to a product in the media section of the backend. It's ...
0
votes
1answer
68 views
WordPress Gallery Permalink Structure Displaying Incorrectly
When an image is added to a gallery, the resulting attachment URL is generally displayed in a structure like this: example.com/post-slug/attachment-slug/
However, take a look at my gallery: ...
1
vote
0answers
80 views
How to edit attachment with media-upload.php?
I'm looking to edit an attachment and I'm trying to supply a link to the existing preview image.
<a href="media-upload.php?type=image&TB_iframe=true&" class="thickbox" title="Edit Image" ...
0
votes
1answer
41 views
dynamically get post attachment while editing
I want to show a meta box on the post edit screen, that contains a list of the images attached to the post. I need the meta box to work for new posts as they are being created. It should update ...
2
votes
0answers
48 views
Page Attachment Permalink Structure based on Menu Order?
I've been on a quest for the past couple of days reading up on Rewrite in WordPress but still can't seem to figure out how to accomplish this.
When using pretty links in WordPress, media attached to ...
0
votes
1answer
286 views
Why can I not view image attachment pages?
I have a problem with images.
I can see my uploaded images, as previously, through the media library. I can access each image by clicking on "edit". But if I then click on "View Attachment Page", I ...
1
vote
1answer
396 views
Saving Custom Field in Attachment Window in WordPress 3.5
I'm using the code below to add a custom text field in WP 3.5 Attachment Window (from this question # Expanding new Media Uploader in WordPress 3.5) ...
add_filter( 'attachment_fields_to_edit', ...
0
votes
0answers
35 views
How to disable parent post in Wordpress
Wordpress associates an image with a post, which is great when it's used for only one post as it will therefore remove the image if the post is deleted, keeping the files and database clean.
However, ...
2
votes
2answers
120 views
Correct Way To Show Custom Taxonomy for Image Attachments on Template File
I've created a custom taxonomy called imagetags using the following code:
// Register Custom Taxonomy
function custom_imagetags_taxonomy() {
$labels = array(
'name' => _x( ...
5
votes
1answer
90 views
Remove duplicate attachments
Here is the situation:
I have an automated script that upload attachments and link each attachment to a specific post. By mistake, the script run multiple times and I have the following
More than ...
1
vote
1answer
101 views
Display random gallery images and its parent post title leading to parent post permalink
I usually have a gallery in posts. I want to display random image and its post-title from a random published post which can lead to permalink like related posts below a post.
I used this code:
...
0
votes
3answers
1k views
How to get Page/Post Gallery attachment images in order they are set in backend using WP_Query()?
I am trying to retrieve all the images from the Gallery of a page in the order they are set in the backend.
So far I have:
$my_wp_query = new WP_Query();
$all_wp_pages = $my_wp_query->query(
...
-1
votes
1answer
224 views
Add an attachment feature to comments
Is there a way to allow attachments with wordpress comments?
I know of a paid plugin that allows this but I was hoping for someone to point me in the correct direction that's future proof and doesn't ...
0
votes
2answers
57 views
Upload image and assign it's id to post
At the moment i am working on database conversation script from other cms to Wordpress and faced one problem: I have a list of images, so i need to upload it to Wordpress, after it receive new link, ...
0
votes
1answer
111 views
ID of images from wordpress galelry
Does anyone know how to get ID's of images from wordpress gallery in post? I have search entire internet and there is nothing to this subject.
Thx for your time :)
0
votes
2answers
193 views
Image Gallery Numbers for 3.5
In previous installations of WordPress it was possible to number images in attachment.php using the code below, which was originally provided here. However, I'm finding that this code no longer works ...
0
votes
1answer
79 views
Show list of custom posts with respective attachments?
I would like to construct a query to show a list of custom posts ("podcasts") with the urls to their respective attachments. Each custom post_type ("podcast") has 1 attachment (the mp3 file belonging ...
0
votes
1answer
53 views
How do I add multiple post types to this query?
The code i use calls for all attachments that are uploaded to be in the post. I added the Gallery custom post type but nothing shows.
It shows on my "pretty-little-liars" post type though. What am I ...
1
vote
2answers
81 views
How can I attach hotlinked images in posts/pages within the same server?
Not sure if this makes sense but I'm trying to attach hotlinked images to their posts/pages with no lucky, most plugins such Cache images works ok but only to external domains, I need to auto-attach ...
0
votes
1answer
49 views
Unable to attach media to post [closed]
I'm trying to attach some unattached files I've uploaded via the Media menu, but the selection box that appears is empty, that is no posts or pages are presented.
I've tried to deactivate all plugins ...
1
vote
1answer
118 views
Multiple images in one attachment page
I want multiple images for one post attachment page, but there is no option for that. How can I do that?
0
votes
1answer
120 views
Use full size images in a specific gallery
Thumbnails are displaying as 100px however the full size is 130px which is what I want.
I want this only in one specific gallery.
Also would like to link each gallery thumbnail image to an external ...
3
votes
1answer
180 views
On Multisite: Loop to Show First Four Images of Recent Posts Across Network
I would like to display the first four images from posts across a WordPress network.
In Otto's image gallery tutorial he recommended using the following to get images from recent posts. Query ...
0
votes
2answers
124 views
One picture belonging different galleries?
How can one picture belongs different galleries?
For example, there are two galleries. I want to avoid loading the image twice (in two galleries) but it shown (included) in the first and second ...
0
votes
1answer
126 views
Don't show attachments if they are inserted in post
I have attached images that I have inserted into my posts but they also appear in the attachments box at the bottom of the post.
I'd like to know how to make them not appear in the attachments box if ...
1
vote
1answer
142 views
Adding class to next/prev image link in attachment.php
Is it possible to add a class or ID to next/prev image links in attachment.php?
I tried like this but it didn't work:
<?php next_image_link( false, 'Next', array('class' => 'next')); ?>
0
votes
1answer
253 views
How to get the next and previous image title from attachment or gallery?
I'm trying to build a slider exactly like http://goo.gl/A7WtZ in wordpress. I have managed to make the slider work except the next/prev button. I need to get the next image title and the previous ...
0
votes
1answer
573 views
How can I hide media library images from general users?
As an admin I really like the features and functionality of the WordPress 3.5 media manager.
With a multi-user site however all users can see all images in the media library - whether uploaded by ...
2
votes
0answers
291 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 ...
5
votes
2answers
709 views
How it is possible to use taxonomies on attachments?
With WordPress 3.5 was changed the media management and edit screen use the default of edit post type UI. The taxonomies is very usefull for WP installs, there have different users and attachment to ...
15
votes
2answers
2k views
How to manage attachment relationships for specific posts in WP 3.5+
In WordPress 3.5, media management has changed entirely. Also, relating attachments to specific posts is (I believe) basically only being done for backward compatibility. Therefore, after uploading ...
1
vote
1answer
126 views
How to delete all post and attachments of a user when I delete it?
When I delete a user, WordPress can just delete the post or page of this user,
not his custom post and his attachments.
An idea for a special hook?
add_action( 'delete_user', 'my_delete_user');
...
5
votes
2answers
975 views
Expanding new Media Uploader in WordPress 3.5
In current version of WordPress it is quite easy to expand the attachments fields using attachment_fields_to_edit filter, but in latest WordPress 3.5 RC2 it's not working. We can expand it using ...
1
vote
2answers
233 views
Change code to display image attachment page
I have this code which displays images with their captions in a list.
On clicking caption, opens image in an attachment page, but clicking on image, opens that image with a dark-gray background. Is ...
0
votes
2answers
366 views
Get an image from url in front end submission form
I am building a user generated content sharing theme
so how can i allow visitors to upload an image from a url
i mean to say that they enter the url and the image gets automatically attached
this is ...
0
votes
1answer
117 views
Attach images to posts using custom fields (just paths to images already upld)
I'm setting up a real estate website, which i make listings using a custom post type 'listings' in which I have multiples metaboxes for beds, baths, and all other informations.
I use a plugin to ...
1
vote
2answers
309 views
Removing width and height attributes from wp-get-attachment
I'm using this http://www.ghosthorses.co.uk/production-diary/removing-inline-img-dimensions-for-responsive-wordpress-websites/ to remove the height and width attributes of images. Everything works ...
1
vote
1answer
547 views
Adding width and height to wp_get_attachment_image_src
I'm trying to add the width and height attributes to the wp_get_attachment_image_src. Why is this returning width and height:0?
<?php
$image = wp_get_attachment_image_src( get_post_thumbnail_id( ...
0
votes
1answer
122 views
Display Audio Attachment URL
To get the image url from a Post Thumbnail in WordPress to display it in a template, I would use:
<?php $image_id = get_post_thumbnail_id(); $image_url = ...
1
vote
1answer
620 views
Set Featured Image Front Frontend Form
I have been struggling for days to figure this one out. I have successfully implemented a form to submit posts from the front end of my site. ButI can't figure out how to make the image uploads work.
...
1
vote
2answers
114 views
Wordpress Image Attachment using remote image
Is it possible to use remote image as wordpress attachment?
* Not stored on our server..
How about the code/script?
i see that attachment is act as post in database..
seems it's possible.
UPDATE
...
0
votes
2answers
709 views
How can I export WordPress posts' attachments?
I am in the process of transferring posts from one WordPress install to another. I can use WordPress' Tools --> Export to export the XML I need for my posts. On the new install, I then use Tools --> ...
3
votes
1answer
138 views
Show Post ID in “Find Posts or Pages” box in Media Library?
In the Media Library, when I go in to attach a media item to a post, I know I can use "Attach" to pull up the "Find Posts or Pages" pop up.
This brings the following list of post title, date and ...
