Tag Info

New answers tagged

0

You can try this plugin: https://wordpress.org/plugins/optimize-images-resizing It resizes images based on your registered image size, but only when needed. Also can cleanup existing image sizes so they can regenerate.


0

You would need to recode your CSS a little. Since you have your beer image in its own container that helps. But you'd want to adjust the CSS: .beer-description{ float: left; width: 70%; } You can tweak it as needed. To not worry about the image size, you should have a width set (can be a percentage) on the beer-image container and then 100% ...


0

hi if you are awaire database than use these steps. Log into phpMyAdmin. Export your database as an SQL file. Make a copy of your database SQL file so you have a backup of your original database, in-case you screw up. Open up your database SQL file in a text editor. Find and replace domain1.com with domain2.com. Save your database SQL file. Log back into ...


0

If you're always blowing up a small image to a larger size, and don't care about the resulting loss in quality (although personally I would, for photos at least) then you might as well simply override the height and width in CSS (or inline HTML) - there's no gain in making the image file on your server any bigger. And yes, don't ever use TimThumb.


0

You can use OTF Regenerate Thumbnails. Currently I'm using this with latest WP 4.2.3 and it's working fine without any issue.


2

I am working on something that uses images in a very similar fashion. As mentioned, you will need to implement custom meta boxes for your 'product' post type to create an image field. I use the CMB2 framework to build out the meta boxes. It provides several field types, one of which is file_list. File_list allows you to set multiple images via the ...


0

1) Filter wpautop() with ACF: function filter_ptags_on_images($content) { $content = preg_replace('/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $content); return preg_replace('/<p>\s*(<iframe .*>*.<\/iframe>)\s*<\/p>/iU', '\1', $content); } add_filter('acf_the_content', ...


0

This is likely a tweak the theme author made to make the images in the theme responsive or adaptive. You may want to look at adding "min-height" to your CSS and this should address your problem. https://css-tricks.com/almanac/properties/m/min-height/ Also another thing to note if you using "100%" anything the actual dimension is governed by the parent ...


0

.wp-caption img, .wp-caption { width:auto !important; max-width:100% !important; height:auto !important; }


0

Are your Wordpress URL and Site Address URL the same? I had a similar issue whereby one had a backslash and the other didn't which caused it. Also, could you try inspecting the element in Chrome or Firefox and seeing where the URL points? Can you get to this URL directly from the browser?


2

Yes you can. See my working fiddle here: http://jsfiddle.net/MonkimoE/0wtgm8a1/ You need to add an id. example: <img class="img" id="imageid"..... Delete all atribute "data-width" and "data-height". because it will added automatically. Add this javascript: (you may change the '$' to 'jQuery' if doesn't work with your theme) <script> var ...


0

Add these code to your theme function file. add_image_size('mythumb', 350, 200, array( 'left', 'top' )); // third parameter is for cropped option, you can change that as your preference. the_post_thumbnail( 'mythumb' );// image with the new dimensions. Important: you need to regenerate thumbnails to make this work. You can use plugin for that. For ...


0

What about .htaccess maybe you have to change RewriteBase / to RewriteBase /stepladder


0

Enjoy it easy and the best way <div class="col-md-8"> <?php $aboutcompanys = get_post_meta(get_the_ID(), 'aboutcompany', true)?> <div class="teaser"> <?php foreach($aboutcompanys as $aboutcompany){ ?> <img src="<?php echo ...


0

You coudld just use $housePhotos = get_post_meta( $post->ID, 'house_photos', true ) to get an array of the image id's. Then you could get the first image by saying $imageURL = wp_get_attachment_image_src( $housePhotos[0], 'house_search' );


1

I assume you would like to end up with something like this: Theme way If you want to put this logic in your template, as you state in your question, there is quite a bit of coding. You need to: create metabox create content (field and description) in that metabox - that's called "callback" in the meta_box docs create logic that saves data from the ...


0

// Replace the title of img tag with image caption function wpdocs_filter_gallery_img_atts( $atts, $attachment ) { $attachment = get_post( $attachment->ID ); if ( $caption = $attachment->post_excerpt) { $atts['title'] = $caption; } return $atts; } add_filter( 'wp_get_attachment_image_attributes', ...


0

in functions.php: function yourTheme_thumbnail($size) { if( has_post_thumbnail() ) { GLOBAL $post; // get thumbnail url with given size. $url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), '$size' ); // return it as an CSS property. $backgroundImage = 'background-image: url(' . $url[0] . ...


0

Looking at your site, it seems that the broken image on the top left side is your logo. I suspect there might be a logo upload for the theme but we won't be able to direct you to where that logo upload form is because it can vary depending on the theme. You'll want to check for the theme options area often located under the Appearance menu in the admin ...


-1

This simply doesn't work. Wordpress resizes the images while uploading, so if you don't upload them again, nothing will happen.



Top 50 recent answers are included