-1
votes
0answers
28 views

A ShortCode Within a ShortCode. INCEPTION [duplicate]

Problem I have a plugin called WP-Filebase https://wordpress.org/plugins/wp-filebase/ & http://wpfilebase.com/, which allows a user to upload media and it has a shortcode to allow the user to ...
1
vote
1answer
30 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 ...
0
votes
0answers
10 views

Fluid full window width carousel Image Problem in WordPress [duplicate]

Slider link:- http://coolcarousels.frebsite.nl/c/2/ Here is my HTML script for the slider- <div id="wrapper"> <div id="carousel"> <img src="<?php echo ...
0
votes
0answers
12 views

Default image (logo) for customizer [duplicate]

I want to let users upload a logo. I've tried a few things. Currently there is a broken image until a logo is uploaded. I need to set the default as logo.png in my theme folder. Here's how it stands ...
0
votes
2answers
178 views

Permanently remove first image from posts

I have around 2,500+ posts on my site where I've inserted images using the traditional method into the post content itself. In upgrading to a different theme, the single post page now displays the ...
0
votes
1answer
200 views

PHP code to call image Caption, Alternative Text, and Decription?

Is there a Wordpress PHP code to call an image Caption, Alternative Text, and Decription? I have several images with Titles, captions, alt text and Description fields filled and would like to display ...
-1
votes
1answer
54 views

Display Post Titles on top of the_post_thumbnail()

I'm working on an issue that's just about solved, but I'm currently stuck. I've changed content php to change the way posts are displayed. I've ran $wp_query->current_post to determine what the post ...
0
votes
0answers
37 views

Slider Issues using MetaBox Plugin

I'm just now joining a previously launched project. The home page slider is a custom meta_box type from the MetaBox plugin. Here is the code to add the fields. $meta_boxes[] = array( 'id' => ...
0
votes
0answers
50 views

PHP script to list all images from Nextgen gallery

I would like to list all photos from nextgen directory. Could anyone help me how it might look like to get it by using scripting in PHP?
0
votes
1answer
51 views

Creating image gallery in wordpress

Lets assume I have two following directories fruits and vegetables under my image folder and that I want to show all images on some specific page. My questions are following: How to implement PHP ...
0
votes
1answer
86 views

Retrieve first image url from custom post with pagination

On my custom page with pagination I have 6 pictures from the last posts, so far so good. Have a look here: http:sayami.de My code: <?php global $wp_query; $paged = ...
0
votes
1answer
82 views

Image limit from 1 to 5

I found this code posted by: MikeSchinkel some time ago have a question how to change this code that i will be able to upload max 5 pictures insteed of 1 ? :) ...
0
votes
1answer
36 views

Name Input from widget displays Sidebar name instead of saved data

I wasn't sure how to title this question,so I apologize. Let me first state that I have no experience with this type of code but I really need to this feature for my website, so I appreciate all the ...
1
vote
1answer
819 views

Create Image Uploader for Widget

I found this post// Use Media upload in custom widget on wordpress 3.5 I'm not experienced in any of this so I pretty much just copied the code he provided into my own functions.php file. I uploaded ...
0
votes
0answers
174 views

Altering images inserted into Posts for lazyloading with PHP Simple HTML DOM Parser

I want to find a robust solution to make lazyloading possible for images inserted into a post. There are many lazyload solutions out there. I'm not looking to cater any one of them specifically, but ...
1
vote
1answer
351 views

Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”

Good morning, I am trying to change name format that Wordpress uses to rename uploaded files. As I upload an image whose filename is "desert-landscape.jpg", Wordpress will set up scaled versions and ...
0
votes
1answer
100 views

Getting taxonomy images to display on single-post with their terms

Having some trouble with taxonomy images plugin. I am on single-post.php and I want to display my post's taxonomy terms & the term's associated images. Ideally, I'd like the taxonomy description ...
-1
votes
1answer
33 views

add if statement to the featured image

I have a featured image. I want to add an if statement to the size. For example, if the featured image height exceeds 500px I want to add something. Is that possible ?
5
votes
1answer
613 views

How do I hook into WordPress to save an uploaded photo as an alternate size to an existing photo?

I have image resizing disabled in media settings by setting thumbnail, medium and large size dimensions all to 0. For every photo on my blog, I upload the same photo in three sizes: large/full-size ...
1
vote
1answer
156 views

Use Filename for Alt and Title Tags

I currently name all of my image files like this: Earth the Blue Planet.jpg Which when uploaded gets changed to this: Earth-the-Blue-Planet.jpg I was wondering if it is possible to have the ...
0
votes
1answer
105 views

Strip Image Classes from HTML Output

Does anyone know how to remove all of this from the image HTML? class="aligncenter size-full wp-image-31053"
0
votes
0answers
62 views

Removing Image Attributes

right now my images are outputting like this when I add them to my posts: <a rel="highslide" class="highslide" href="http://domain.com/news/1013/filename.png"><img ...
3
votes
1answer
123 views

Debugging upload problem: What part of WP does actual image-resizing?

I have a problem when uploading large images: images larger then (approx) 2000x2000 aren't generating thumbnails. The file is uploaded fine, but no resized version are generated. No errors are shown. ...
0
votes
0answers
125 views

Automatically Wrap Inserted Images in Div?

When I insert images into a post, it always wraps the lot of them in this: <p style="text-align: left;">image 1 image 2 image 3</p> Is it possible to change that to something like ...
0
votes
0answers
120 views

How to always show pictures on my blog post

On my WordPress blog I'd like to show pictures in every view (e.g. category-view, tag-view, comment-view, single-view) but in the most of this views, I can't see them, and if so, only the ...
0
votes
0answers
47 views

How to set a Maximum Image size to a Field in WordPress

I have a customized frontend form in WordPress that allows to set a featured image to a post before publishing it. I want to set a maximum-allowed "width" as well as a "height" to the "upload image" ...
0
votes
0answers
52 views

Gallery requires a featured image but does not show it in posts/pages

I've encountered a weird bug with my theme's gallery. If I add a gallery, and do not specify a featured image, it will not show in the post/page. If I add a featured image, it will show the gallery ...
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. ...
1
vote
1answer
52 views

Change Width of Featured Image Thumbnail on Add/Edit Post Page

Does anyone know of a way to change the width of the featured image on the edit post/add post page? I want to make it 50px wide. I'm not talking about the front page of the website, but the back end ...
0
votes
0answers
98 views

What code do I use in the functions php file to make an image auto update in a container box?

Is there a way to make an image autoupdate in a container by using code in the functions php file? This is probably a dumb question and I'm probably not asking it right. Basically, I want a box above ...
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
71 views

Clickable image link sends people to wrong URL

On my website www.wilsonstransportation.com, on the header of our custome theme page, we have a "Get a Quote" image on the right hand side. When you click it, it is taking people to ...
0
votes
2answers
526 views

Using file_exists to check file in Uploads

Context: For a site's images used in a particular section, each post relies on a base name put into meta data, which then is used with automatic extensions to generate large images, gallery thumbnail ...
0
votes
1answer
101 views

Snapshot Theme from WooThemes — empty 'alt' attribute

I´m using Snapshot theme from WooThemes. The code which resizes (width and height and size in kb), and shows the images (an 'a' tag, wrapping an 'img' tag) is this one: <?php if ( ...
0
votes
2answers
173 views

Additional image sizes are not being generated

When I upload an image through the admin interface, the image is only saved at full-size. The other sizes are configured to their default values in Settings > Media. The automatic resized versions are ...
2
votes
1answer
393 views

Hide custom image sizes from media library

I want to hide a few custom image sizes from the media uploader: The following code (posted here) works only for the default image sizes: function remove_image_sizes($sizes) { ...
0
votes
1answer
109 views

Changing 2011 theme header image based on user dropdown

I posted earlier about changing my site's CSS based on user-choice from a drop-down and storing it in a cookie, which I think I have now resolved, and sort-of have working at the following address ...
0
votes
2answers
99 views

How do I return an image from a script

I have googled but must not be using the correct terms. I am trying to add a script to my WordPress plugin that takes a url and returns a reformatted image. I know this is frowned upon as ...
0
votes
1answer
168 views

Adding a 'style=' bit to image_send_to_editor output

The best thing I liked about the new v3.5 media manager was being able to insert images to a post hosted by an external site like photobucket using "Insert from URL". I normally format my image ...
2
votes
1answer
2k views

Rename image uploads with width in filename

I am attempting to change the name format that Wordpress uses to rename uploaded files. For example, when I upload an image with filename "cat-picture.jpg" Wordpress will create scaled versions and ...
6
votes
2answers
202 views

How to check if image is already stored in a site's post database? (network)

I currently have configured Wordpress so that a post can be copied to other sites within a Wordpress network. However, a post may be broadcast more than once, and I want to check if the image is ...
-1
votes
1answer
164 views

Convert all uploaded PNG files to PNG-8 format

Running a high trafficed platform. In my quest to minimise bandwidth costs, I added a high JPEG compression on all JPEG uploads (check solution in my previous question). However, Wordpress does not ...
1
vote
1answer
316 views

Add custom image sizes to media uploader

I want to add custom image sizes to the media uploader: In order to do this, I use the following code (comments are there for convenience): // this function adds the custom image sizes to the ...
1
vote
1answer
189 views

Echo URL of large version of Featured Image

I use this plugin to echo the URL of a post's featured image in the header: <?php /** Plugin Name: Post Thumbnail FB header */ function fb_header() { // Not on a single page or post? Stop ...
-1
votes
1answer
398 views

PHP-Code inside Href-Tag

I have include PHP-Code inside a href-tag – and it doesn’t work! <?php $image = get_post_meta($post->ID, 'image_medium', true); if ( $image != '' ) {?> <a href="<?php ...
5
votes
2answers
669 views

Adding a custom image upload size and making it selected by default?

How can I add a custom image upload size with a width of 550px and make it selected by default in the Add Media page? Currently, there are 4 sizes available: Thumbnail, Medium, Large and Full Size. ...
0
votes
1answer
489 views

Saving/Writing/Adding file to upload folder

Within a plugin I am generating an image, I would like to save this image to the upload folder and update the WPDB with the location of said file. I cant find any build in wordpress functions to ...
2
votes
1answer
247 views

Adding a querystring to an image URL when clicking 'insert into post'?

I have written a plugin which does some fancy stuff with GD lib when you upload an image. Everything is working fine, however I need to get the image title and add it to the image URL (and file name ...
2
votes
2answers
1k views

How to register images uploaded via FTP in media library?

I'm using my own upload.php file to upload images to: $upload_dir = wp_upload_dir(); $targetDir = $upload_dir['path'].'/'; It works like it should with this exception that images uploaded to ...
0
votes
3answers
149 views

Only show image from custom field when present

How would I adjust the following code to only show the image tag when there is a variable present in the "imageembed" field? <?php $imageid = get_post_meta($post->ID, 'imageembed', true); ?> ...