-
AuthorPosts
-
October 5, 2015 at 8:53 pm #514041
Hello,
I’d like to display an easy slider instead of the masonry gallery in mobile view. Came across this post https://kriesi.at/support/topic/hide-masonry-gallery-on-mobiles-tablets/?login_error and have created the slider within my page and added the css to child theme but can you give some direction on how to assign styles?
Thanks
October 6, 2015 at 8:19 am #514181Hey kvpacs,
Could you provide us with a link to the site in question so that we can take a closer look please? You can activate custom CSS fields for all elements by doing this: http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/
Thanks,
RikardOctober 6, 2015 at 8:46 pm #514732Hi Rikard,
Looks like I pasted the wrong reference link in my previous post – meant to include this one: https://kriesi.at/support/topic/how-to-make-photos-showing-up-differently-in-responsive/
I’ve included a test page in private content. On desktop views, I’d like to have the masonry gallery visible and easy slider hidden. On mobile, I’d like the masonry gallery hidden and easy slider visible. There are multiple pages I would like to add this change. I’ve activated the Custom CSS field. Can you give me an example of how to assign the styles?
Thanks again
- This reply was modified 9 years, 1 month ago by kvpacs.
October 6, 2015 at 9:03 pm #514740Hi!
Please refer to this post – http://kriesi.at/documentation/enfold/hide-menu-itemselements-on-mobile/
Best regards,
YigitOctober 6, 2015 at 9:22 pm #514757Thanks Yigit, that worked great!
October 6, 2015 at 9:28 pm #514764Hi!
Glad you got it short out!
We will be happy to assist with anything else we can, just let us know!Regards,
BasilisOctober 13, 2015 at 11:22 pm #518429Hi Yigit,
One more question in regards to the css solution. Thank you again – it works perfectly when applied to top-level elements in the page such as a full-width slider or color section. But when I apply to an easy slider located within a column of a color section, the css does not work.Here’s what I’ve placed in my enfold child stylesheet:
@media only screen and (max-width: 990px) {
.only-desktop { display: none !important; }}
@media only screen and (min-width: 990px) {
.only-mobile { display: none !important; }}And here’s an example that’s not working: http://rotarycentreforthearts.com/port/harmony-honda-studio/ Please have a look in mobile view and you will notice the masonry gallery is visible yet has the only-desktop css applied
Thanks
- This reply was modified 9 years, 1 month ago by kvpacs.
October 15, 2015 at 4:45 am #519029Hi,
I did a search for the only-desktop class on the page you linked but there was none, could you check that you have actually added it to the element please? If you should have any further problems then please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.
Regards,
RikardOctober 15, 2015 at 5:03 am #519031Hi Rikard,
I checked and the only-desktop class is definitely there. Open the portfolio item called Harmony Honda Painting & Drawing Studio and it’s applied to the masonry gallery. I’ve tested it with multiple elements and it works with text blocks, special headings, full-width masonry gallery, easy slider, etc, The only situation where it doesn’t seem to work is the masonry gallery within a column.
Temp login details are posted in private content.
Thanks again
October 15, 2015 at 12:58 pm #519247Hi!
Custom class is in custom CSS field but it does not show up on source code. Please try de-activating all active plugins and check if that helps.
Regards,
YigitOctober 23, 2015 at 11:23 pm #524147Hi Yigit,
I went through the process of deactivating every plugin and it unfortunately did not solve the issue.
ThanksOctober 27, 2015 at 10:02 am #525374Hey!
Please modify the config-templatebuilder > avia-shortcodes.php > masonry_gallery.php file. Look for this code around line 267:
$atts['container_class'] = "av-masonry-gallery {$custom_class}";
.. replace it with:
$custom_class = !empty($meta['custom_class']) ? $meta['custom_class'] : ""; $atts['container_class'] = "av-masonry-gallery {$custom_class}";
The custom class should work after that.
Cheers!
IsmaelOctober 28, 2015 at 4:50 am #525879Hi Ismael,
I made your change in the child theme folder and it didn’t work. So I edited the file in the Enfold theme folder and it worked perfectly. Is this something that will be part of the next theme update?
Thanks
October 30, 2015 at 6:16 pm #527611Hi!
unfortunately not. However, you can try to make a feature request for Kriesi here: kriesi.at/support/enfold-feature-requests/
Best regards,
AndyNovember 13, 2015 at 7:29 am #535247The change to config-templatebuilder > avia-shortcodes.php > masonry_gallery.php was made to enfold 3.4.2 theme update. All is good. Thanks again.
November 13, 2015 at 7:33 am #535250Is there a way to mark threads as ‘solved’ when I reply?
November 13, 2015 at 5:51 pm #535581Hi!
No, but you can write “Resolved” or imply that issue was resolved and we will mark the thread as resolved for you :)
Let us know if you have any other questions or issues and have a great weekend!Best regards,
YigitFebruary 17, 2016 at 8:32 pm #584925Hello,
I have the same issue but with Accordion Slider. If I add “only-desktop” in the color section it works. But the “only-desktop” on the accordion custom CSS dont work. Please help me but i dont want to modify the main theme.
[av_slideshow_accordion slide_type='image-based' link='category' items='5' offset='0' size='masonry' title='active' excerpt='aviaTBexcerpt' autoplay='false' interval='5' custom_class='only-desktop']
Grüße
JyothisFebruary 20, 2016 at 6:54 am #586406 -
AuthorPosts
- The topic ‘Replace Masonry Gallery with Easy Slider in mobile view’ is closed to new replies.