1
vote
1answer
33 views

How to add a class to the attachment images

When I'm in the Wordpress editor and I add an external image with the 'img' button, my html result wil be like this: <img src="http://example.com/image.jpg" alt="image" /> How can ...
1
vote
1answer
50 views

wp_mail file attachment not being placed in upload folder?

I have a form where I want users to be able to select an image to upload. The image gets temporarily uploaded to the wp-content/uploads folder, is attached to the e-mail and then is destroyed. Right ...
0
votes
1answer
293 views

Let users upload image(s) to the post from front end

I want to enable logged in users (Wordpress) to submit posts from front end (among with other data). My form is working great, I add custom post meta data which I later display on custom post page. ...
1
vote
3answers
133 views

File upload, uploads only file name

I am working on a simple front end image upload in Wordpress. With this piece of code I can upload to the wordpress media section but I only upload the name and url of the file then, no image. Does ...
0
votes
2answers
126 views

Front end file upload returning wrong attachment url

So I'm making a simple file uploader with wordpress where users don't need to go into wp-admin to add a file. I have it working great, it uploads the file to the correct folder..etc but the only ...
0
votes
1answer
135 views

Correct Syntax for uploading files to custom directory in Wordpress

I have current PHP code that works when attaching files on a form. The files have to go to a certain directory. I know that while attaching in Wordpress I need to use a different syntax. However, I've ...
0
votes
1answer
82 views

Get a Page's attachments in Gallery order

Having created a page and a gallery within that page, I would like to retrieve all the images in that gallery in the order they are set when the gallery is created, i.e. the order which I drag them in ...
0
votes
0answers
67 views

Line break issues with textarea in admin for Attachments

I am not sure if this is an issue with Wordpress, PHP or the Attachments Plugin. I am using the Attachments plugin to save attachments to a post with some meta information. One of which is a caption ...
0
votes
0answers
69 views

How to create attachments page template switch?

I've read several post over this topic, however, none have provided me with an answer. Firsly, let me say that I'm a noob in php programming, but I managed somehow to rewrite my html site to wp theme. ...
0
votes
1answer
43 views

Attaching images to posts manually (i.e. with custom code, without the use of an API)

I am working on mobile API for a WordPress site. The API is written in PHP and provides methods actions such as creation of a post. Now, I can create a post with one image (thumbnail) of the post. ...
0
votes
1answer
128 views

Post Title Not showing up

Hi i'm using this code to call post from a certain category <?php $queryObject = new Wp_Query( array( 'posts_per_page' => 3, 'post_type' => array('post'), ...
0
votes
1answer
56 views

Target all images that are not the first attachment

I'm querying image attachments on a template I'm writing. For a layout purpose, I'd like to apply a css class to all the images that are not the first. Here is the code I'm currently working on, I'm ...
0
votes
1answer
152 views

is it possible to force wordpress to always save thumbnails as 'jpg' not 'png'

I cant see any settings and cant see much in the php api docs regarding this? for instance if the original file upload is a png wordpress converts to jpg
0
votes
2answers
643 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 ...
0
votes
2answers
1k 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 ...
0
votes
3answers
2k views

Create post from form with image

I found this wonderdul script that @Bainternet here at Wordpress Answers created, that makes it possible to attach images into posts from a html form.. I tried to combine in into my "html form to ...
1
vote
1answer
379 views

How grab first two image attachments?

I am grabbing an image that is uploaded to that post working with this function: wp_get_attachment_image_src <?php $images = get_children( array( 'post_parent' => $post->ID, ...
1
vote
2answers
2k views

page template for attachement page?

hey guys, I couldn't find anything on the web. Is it possible to have custom template for the image attachement page. I wonder if it is possible to add a navigation to the image attachement page so ...