sguk
Forum Replies Created
-
Forum: Plugins
In reply to: [Photoswipe Masonry Gallery] Thumbs showing up small on small screenps if you use safari or chrome, right click and view the css, you can see it’s hardcoding the thumb sizes etc. Also safari has a responsive view on the develop menu
Forum: Plugins
In reply to: [Photoswipe Masonry Gallery] Thumbs showing up small on small screenah.. see the other post where I replied to you, earlier on in the post I added some css and mentioned what I do to get more control over stuff like this.
It’s because in the photoswipe settings in WP admin, the width of the thumbnails is set. This stops it being fully responsive.
I set the thumbnail width to 0 0 in the admin
Then add css
.psgal figure { width: 25%!important; -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ -moz-box-sizing: border-box; /* Firefox, other Gecko */ box-sizing: border-box; /* Opera/IE 8+ */ padding: 2px!important; } .psgal figure img { width: 100%!important; height: auto!important; padding: 0px!important; } .psgal figure a { width: 100%!important; height: auto!important; }
That forces the images to be responsive.
.psgal figure { width: 25%!important; }
is desktop 4 columns
You can set this at 100% for your mobile, then use media queries to set to 50% tablet and 33.333% desktopYou might also need to add
add_image_size( 'photoswipe_thumbnails', 400, 9999, false ); add_image_size( 'photoswipe_full', 1800, 9999, false );
to functions.php if the 0 0 stops the thumbnails generating
Forum: Plugins
In reply to: [Photoswipe Masonry Gallery] Does your plugin serve srcset?ps qnother one which can be dropped in as and when is nextgen gallery. It’s separate from the normal media library and you can create multiple galleries in a separate section of wordpress. Each gallery has a shortcode ID and allows you to place it anywhere in your site.
You can then update the gallery from within the nextgen page.Forum: Plugins
In reply to: [Photoswipe Masonry Gallery] Does your plugin serve srcset?This is where your usage can vary when you are not staying within a design layout.
However, ACF has a flexible fields option where you can have pre-coded multiple choice content areas, such as gallery, text with header, 2 column text you, image area etc + you can drag and drop the order of these.
ACF gallery is attached to a post, but any post content can be pulled into another post or page. You can also use the global option or you can probably code in shortcodes too.
Forum: Plugins
In reply to: [Photoswipe Masonry Gallery] Does your plugin serve srcset?Wordpress Gallery has improved since I last looked at it, I only realised recently you can now reorder by editing the gallery etc.
If the whole admin uses ACF I find it’s better as ACF isn’t a wysiwyg area, so you don’t need to explain to the client to click “add media” then create gallery etc.
In ACF it’s already a gallery field and there’s also no possibility they will try to put text there or a static image.
In a custom built theme with specific page areas coded in, ACF gallery ensures instantly the client knows how to use it, can reorder, etc and see cearly what that area is.
Obviously whether it’s easier or not is open to opinion, but in our case it is. This doesn’t however suggest there is anything wrong with WordPress Gallery itself.
The other thing is WordPress Gallery lets you set the columns, I’m not sure how this would interrupt coding when using ACF gallery to do other things like add images for a fading slider etc.
So again, just depends on usage.
Hope this helps ??Forum: Plugins
In reply to: [Photoswipe Masonry Gallery] Does your plugin serve srcset?ps noted that your plugin “uses” photoswipe and yes you’re right of course, to make photoswipe use conditional images/ srcset would require some modification to the photoswipe js or php files.
Forum: Plugins
In reply to: [Photoswipe Masonry Gallery] Does your plugin serve srcset?yep, here you go
<?php $image_ids = get_field('gallery_images', false, false); $shortcode = '[gallery ids="' . implode(',', $image_ids) . '"]'; echo do_shortcode( $shortcode ); ?>
This loads in the images from acf
We also then set the thumbnail sizes in the photoswipe settings to 0 0 and added the following css.psgal figure { width: 25%!important; -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ -moz-box-sizing: border-box; /* Firefox, other Gecko */ box-sizing: border-box; /* Opera/IE 8+ */ padding: 2px!important; } .psgal figure img { width: 100%!important; height: auto!important; padding: 0px!important; } .psgal figure a { width: 100%!important; height: auto!important; }
This makes the images fully responsive, so we can set the width to 50% mobile and 33.33% ipad etc and change the columns loaded by masonry.
Not sure if this is needed in all cases, I but I found I had to also add the image sizes to functions.php probably as I had set thumbnails to 0 0 to take control of sizes.
add_image_size( 'photoswipe_thumbnails', 400, 9999, false ); add_image_size( 'photoswipe_full', 1800, 9999, false );
Of course, someone could also have cropped images so they have a consistent grid of images but in this case we are using Masonry so it makes sense to have auto height.
Forum: Plugins
In reply to: [Photoswipe Masonry Gallery] Does your plugin serve srcset?Yes we are, as it’s easier for the client in the admin than WordPress gallery
Forum: Plugins
In reply to: [Photoswipe Masonry Gallery] Does your plugin serve srcset?Hi is there anything we need to do to make srcset work with photoseipe?
We load the images with acf gallery and on mobile it’s loading the full size images, the same as desktop.Forum: Fixing WordPress
In reply to: Problems with 4.5 upgrade ADD MEDIA not working@fredmiller
I doubt headspace will be updated as it’s last update was 3 years ago, however the problem with that seems to be more jquery related as WP4.5 updated jquery.
See https://www.ads-software.com/support/topic/problem-with-wp-45?replies=8
A couple from the bottom, Jacob, he’s provided a solution by editing one file (plugins, edit, then select file), that may enable you to start using headspace again.Forum: Fixing WordPress
In reply to: Problems with 4.5 upgrade ADD MEDIA not working@fredmiller, this seems to be a core issue in the way WP 4.5 addresses memory usage. They changed the way they handle image uploads/optimisation so I guess that comes into it.
Hopefully a core update 4.5.1 will rectify the issue!Forum: Fixing WordPress
In reply to: Problems with 4.5 upgrade ADD MEDIA not workingAh! ?? I only updated one site luckily!! That gave me 3 hours of headaches earlier and ruined my Sunday! Same for you by the looks of it.
I guess the hide errors stops the php from stalling whilst accessing the media library by bypassing the error.The issue is still there (just hidden) and WordPress really need to address it, it’s stupid using ini_set when they surely know this is disabled on many hosts.
Strange thing is with this error is my host machines are already set to 256mb memory, yet adding this to php.ini stops the error.Forum: Fixing WordPress
In reply to: Problems with 4.5 upgrade ADD MEDIA not workingAs I said at the bottom of page 2 of this forum several hours ago… it’s memory related. I also provided the solution.
Forum: Fixing WordPress
In reply to: Problems with 4.5 upgrade ADD MEDIA not workingI can confirm Imagemagick is ok, it wasn’t working for me as we’d moved the site to a new server which didn’t have it installed. It’s now working, so I reactivated the ImageMagick plugin and all is fine.
Infact after adding the php.ini and line to htaccess I supplied at the bottom of page 2 of this thread, everything is ok here, so it looks like media library not showing, ini_set error on quick edit/add category etc are related to memory requests.
Forum: Fixing WordPress
In reply to: I can't upload Featured Imagessee my post at the bottom of this page (and top of page 3)
https://www.ads-software.com/support/topic/problems-with-45-upgrade-add-media-not-working/page/2?replies=62
This may also solve your issue