Forum Replies Created
-
AuthorPosts
-
OK, @Guenni007 — putting the following in my child’s function.php file and re-uploading the images at a size greater than 495×400 worked! (note: regenerating the thumbnails with the Regenerate Thumbnails by József Koller plugin did not seem to work for me/this).
I’m curious, do you know what the 10, 1 refers to in the function?
Regardless, this solved my issue / answered my question — thanks so much!!
<?php
function custom_modified_thumb_sizes( $size ){
$size[‘magazine’] = array(‘width’=>495, ‘height’=>400 );
return $size;
}
add_filter(‘avf_modify_thumb_size’, ‘custom_modified_thumb_sizes’, 10, 1 );@Ismael — I did regenerate images and also tried re-uploading, just in case. The image I’m uploading is 720 x 465, so, as I understand it, it should crop to my new 495 x 400 size (since it’s bigger than that in both directions). But, BTW, should I even have to regenerate/re-upload since I’m just switching the Magazine size to use a thumbnail size already available in the theme?
@Guenni007 — Thanks, but I’m not trying to add a new size to the array, I’m just trying to tell the Magazine element to grab a different size — a size that’s already available in the theme. So I think it’s a little different solution than you’re referring to. But I could be wrong ;)Thanks @guenni007, that got me to the point where the functions.php file in my child theme isn’t breaking the site ;) So now I have the following in my child theme functions.php file. As you can see, I’ve changed the magazine line to use the same 495 x 400 used by the portfolio line. It doesn’t seem to be working — am I missing some code here, or do you have any other clues for me?
(@Nikko, thanks for the plugin suggestion, but I’d rather not just change all the 710 x 375 images generated by enfold to 495 x 400 — I’d rather just change what the magazine element uses and still have that 710 x 375 size available for other uses.)
<?php $avia_config['imgSize']['widget'] = array('width'=>36, 'height'=>36); // small preview pics eg sidebar news $avia_config['imgSize']['square'] = array('width'=>180, 'height'=>180); // small image for blogs $avia_config['imgSize']['featured'] = array('width'=>1500, 'height'=>430 ); // images for fullsize pages and fullsize slider $avia_config['imgSize']['featured_large'] = array('width'=>1500, 'height'=>630 ); // images for fullsize pages and fullsize slider $avia_config['imgSize']['extra_large'] = array('width'=>1500, 'height'=>1500 , 'crop' => false); // images for fullscrren slider $avia_config['imgSize']['portfolio'] = array('width'=>495, 'height'=>400 ); // images for portfolio entries (2,3 column) $avia_config['imgSize']['portfolio_small'] = array('width'=>260, 'height'=>185 ); // images for portfolio 4 columns $avia_config['imgSize']['gallery'] = array('width'=>845, 'height'=>684 ); // images for portfolio entries (2,3 column) $avia_config['imgSize']['magazine'] = array('width'=>495, 'height'=>400 ); // images for magazines $avia_config['imgSize']['masonry'] = array('width'=>705, 'height'=>705 , 'crop' => false); // images for fullscreen masonry $avia_config['imgSize']['entry_with_sidebar'] = array('width'=>845, 'height'=>321); // big images for blog and page entries $avia_config['imgSize']['entry_without_sidebar']= array('width'=>1210, 'height'=>423 ); // images for fullsize pages and fullsize slider $avia_config['imgSize'] = apply_filters('avf_modify_thumb_size', $avia_config['imgSize']);
Thanks, but how do I set up the child functions.php file? If I just copy the functions file to the child theme it breaks the site. Sorry, I can’t seem to find those instructions. Thanks!
Here’s what (sort of) worked for me (I’d prefer it if the menu also opened when you clicked on the word “menu”). Note, this is for screen widths wider than tablet portrait:
@media only screen and (min-width: 769px) { li.av-burger-menu-main:before { content: 'MENU'; position: absolute; left: -40px; top: 35%; }}
November 7, 2017 at 4:17 am in reply to: menu display as icon cancels out sidebar widget custom menus #873509Yep, you can close it — thanks again.
November 4, 2017 at 11:57 pm in reply to: menu display as icon cancels out sidebar widget custom menus #872635Yep, that did it — thanks!
November 3, 2017 at 6:28 pm in reply to: menu display as icon cancels out sidebar widget custom menus #872247That brings back the sidebar menus, but also adds back the text version of the main/top nav: https://www.evernote.com/shard/s320/sh/dcb28ad8-b555-492b-a3c6-bf0f89b718cb/98ed5a2a1ee849baf37e2232341f92bf
November 1, 2017 at 3:05 pm in reply to: menu display as icon cancels out sidebar widget custom menus #871264Doesn’t appear to have done the trick: http://paulapaula.com/beta/narrative/flock-of-dudes/
October 31, 2017 at 3:15 pm in reply to: menu display as icon cancels out sidebar widget custom menus #870853Sure…
OK, thanks so much!
OK, credentials in Private Content. My custom css is in Appearance > Custom CSS. I added your css at the top. Note, right below that is some custom css I added to make sure there’s enough room in mobile views for the logo and background image in this header. Please let me know if you have any questions. Thanks!
Ah, I didn’t know you could update code in a previous post :) So, thanks again, but it’s still not working for me — now I’m seeing this between those widths (the menu moves up, but doesn’t switch to mobile): https://www.evernote.com/shard/s320/sh/3945db37-644a-4964-9ad2-63dd090135d5/8961e9e14954e293a4f5c9ee8c5ed23b
What do you mean you updated the code? Where? What’s the new code? I flushed the cache, but I’m still seeing my same old custom css in my custom css plugin pane and I’m still seeing the same behavior/styling I described in https://kriesi.at/support/topic/switching-to-mobile-menu-on-higher-resolutions/#post-849676 — the same behavior/styling associated with my css.
September 12, 2017 at 5:24 pm in reply to: Couldn’t add the font because the server didn’t respond error #851117OK, thanks — the client’s letting it slide for now with the available icons, so I don’t need to contact the host, for now. Thanks again.
Thanks, but that didn’t seem to work — here’s what I saw between those widths with that code: https://www.evernote.com/shard/s320/sh/e180d989-47b3-4a91-be1a-f9bfc8c41671/2cff916433d32c1a2ea185dac6e9b89b
Sure, you can close it — thanks.
September 10, 2017 at 2:46 am in reply to: Iconfont Manager Error "Couldn’t add the font because the server didn’t respond" #850026I’m getting the same error on http://dev.sustainablelandscapessd.org/ — you need my FTP info to troubleshoot it?
Oops, sorry — the second link should’ve been https://www.evernote.com/shard/s320/sh/a247515f-e3f8-4bc0-a2bb-c1794eb8c95e/eb89491c29bf0aa83b5a48823dc7ee52
Yeah, I think so. I mean, I’d rather see what’s actually constraining the width and try to change that, rather than just overriding it with that !important. I’m not sure how much of an issue the !important causes (if any) with the mobile views. But I think this is sufficient for me / for now.
Right, sorry, I thought I sent you a private reply back in August, but maybe it never went through.
Anyway, so, now, between 1224 and 990, I have this: https://www.evernote.com/shard/s320/sh/cab8e187-5a94-4f15-98f6-65a143cb23ee/5445ecdef82ee2312c3200df2cb8b530 — looks like the burger and search icon are aligned bottom in the header and the search icon is gray.
And under 990 it’s your default mobile css: https://www.evernote.com/shard/s320/sh/cab8e187-5a94-4f15-98f6-65a143cb23ee/5445ecdef82ee2312c3200df2cb8b530 — looks like the burger and search icon are aligned top in the header and the search icon is blue.
So, isn’t there a way to set your default mobile css to kick in at 1224 instead of 990?
Thanks again.
OK, thanks!
Yes, I want it to be 746px.
That makes the search icon bigger, but the whole thing is still apparently being handled differently than it is in your default code, for below 990px width. The search icon is grey instead of blue, and both are positioned at the bottom of the header instead of at the top. Isn’t there a way to just do exactly what you do at 990, but at a wider width?
Thanks.
Thanks, getting closer, but the search icon is small — not big and blue, like your default mobile search icon — and the positioning of the burger and the search icon is a little lower/different than what you guys have in your code.
So now I get this between 1224 and 990:
https://www.evernote.com/shard/s320/sh/923bb6cf-2035-44e9-ba40-de48d0f0f3eb/And this under 990:
https://www.evernote.com/shard/s320/sh/cee31b5f-3f32-4ddc-9ea3-dffd1a52a3a0/67271424d8d47dec3fb336c3aa23b158I wish it could be as under 990 for both. Also, do I really need ALL this code?
@media only screen and (max-width: 1224px) { .av-burger-menu-main { display: block!important; } #top .av_mobile_menu_tablet .av-main-nav .menu-item { display: none!important; } .responsive #top .av_mobile_menu_tablet .av-main-nav .menu-item-avia-special { display: block; } #top .av_mobile_menu_tablet .av-main-nav #menu-item-search { display: block !important; } }
Thanks!
Sorry, that’s still not working for me — I’m still not getting the magnifying glass. Here’s what I have — I’m trying to show the burger AND the magnifying glass at anything less than 1224px — right now, only the burger is showing — what should I add to or remove from this media query? Thanks!
@media only screen and (max-width: 1224px) { .av-burger-menu-main { display: block!important; } #top .av_mobile_menu_tablet .av-main-nav .menu-item { display: none!important; } .responsive #top .av_mobile_menu_tablet .av-main-nav .menu-item-avia-special { display: block; } }
Huh? That’s basically the bottom half of the code from http://kriesi.at/documentation/enfold/switching-to-mobile-menu-on-higher-resolutions/ — if I remove that, I’m left with both the burger AND the text version of the nav showing between those widths.
Hey, thanks so much — Günter’s code is working for me on posts using the default editor, but not on posts using the ALE (Advanced Layout Editor) — is there a snippet I can add so excerpts for posts using the ALE are also limited in length?
Ah, ok, thanks anyway. So then is the thing to do to keep an eye on the change documents you put out with your theme updates, to look for changes to the loop-index.php file so I can keep my child theme version up to date?
OK, here you go — https://pastebin.com/pACcxE0F — my code starts on 257 and ends on 278. Again, I’m looking for how to include as little as possible of the loop-index.php file in the child theme, to avoid interfering with — or not benefitting from — future theme updates.
Thanks!
- This reply was modified 7 years, 4 months ago by sky19er.
-
AuthorPosts