Tagged: child themes, function.php, theme update
-
AuthorPosts
-
March 18, 2018 at 10:18 am #928672
Hi,
I’ve updated my theme to the last version and i’ve created a child theme using your tutorial-video and the “enfold-child” folder you provide.
I’m just having some problems:
1. Almost all the CSS is working, but the code related to the Magazine Element is not. I had bigger (than normal) immages in the magazine element, as you can see looking at the square around them; but now they are smaller then before.
2. I used this code:add_filter('avf_magazine_entries_query','avf_magazine_entries_query_mod', 10, 2); function avf_magazine_entries_query_mod($query, $params) { if(is_singular('post')) { $query['post__not_in'] = array(avia_get_the_ID()); } return $query; }
to hide the post that i’m actually reading from the ones suggested inside the magazine element. It worked on the parent theme, but now if i put this inside the function.php file of my enfold-child folder (and update it with my cPanel), it doesn’t seems to work.
3. I’ve modified the iconlist.php file to change the headers of the iconlist from H4 to H3. Now I’m trying to follow the steps indicated here: https://kriesi.at/support/topic/icon-list-size-4/
But it doesn’t work.I know it’s a long topic but can anyone help me with this?
Thanks a lot!
Regards
March 20, 2018 at 4:08 am #929489Hey viaggiareverde,
I see that you have given us a admin login, yet I don’t see a url to your site, please provide.Best regards,
MikeMarch 20, 2018 at 10:01 am #929638March 20, 2018 at 12:15 pm #929771Hi,
Thank you for the link.
1: I looked for your CSS for the magazine element, but I couldn’t find any custom CSS. I looked in your
A: Child theme stylesheet, (WordPress > Appearance > Editor > Child Theme > Stylesheet)
B: Enfold Theme Options > General Styling > Quick CSS field,
C: WordPress > Customize > Additional CSS
please try to add your CSS to your child theme stylesheet, first option above.2: I see that in your child theme functions.php you added your function inside the comment area, I moved your code. I didn’t find the page that it was to effect, so please check that it is now working.
3: For your copy of the iconlist.php to work in your child theme, you needed to add this code to your functions.php, I added it for you. But I didn’t find the icon list you wanted it to work for, so please check that it is now working.
add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1); function avia_include_shortcode_template($paths) { $template_url = get_stylesheet_directory(); array_unshift($paths, $template_url.'/shortcodes/'); return $paths; }
Best regards,
MikeMarch 21, 2018 at 4:45 pm #930666Hi Mike, I’ve just checked. Problems 2 and 3 completely solved, thank you!
1: I placed all my CSS in the stylesheet as suggested. Just two things are not working.
A: This CSS below is for the dimension of the icon in the icon list. I’m using it to make them smaller. And this is not working (I have a green line instead of the icon) as you can see here: https://www.viaggiareverde.it/capo-verde-informazioni-utili/
That’s the CSS code I used:} @media only screen and (max-width:767px) { #top .avia-icon-list .iconlist_icon { height: 40px; width: 40px; line-height: 40px; font-size: 20px; }
B: Before the installation of the Child Theme I had bigger photos in the magazine element (amost 2 times the “normal” dimension). If i’m not wrong I used this CSS code below (but maybe something else) to make them bigger. Now they are shown in the normal size.
.av-magazine-thumbnail { width: 150px; height: 120px; }
I tried to increase the dimensions but nothing seems to work.
C: Just a question. I don’t remeber what is this CSS code. Do you know?
} #respond .comment-form-url { display: none; }
Thanks a lot for your help!
Regards
Luca
March 22, 2018 at 2:36 am #930989Hi,
Glad to hear 2 & 3 are solved
As I inspect your site I don’t see that the folder /wp-content/uploads/dynamic_avia/ activate and loading the css
this is a new feature and is needed now.
Can I ask, when you last updated, do you update via FTP or though the admin update panel?
While we are sorting this our please clear & disable your cache plugin and minifying, I see you have these loading now.Best regards,
MikeMarch 22, 2018 at 10:32 am #931120Hi,
I’ve cleared and disabled the cache/minifying plugin.
I’ve updated the theme using the “Theme Updates” panel on the WordPress dashboard.Regards
March 22, 2018 at 11:37 am #931158Hi,
Do you mean that you didn’t update via FTP before? If you update via FTP you must remove the old copy of Enfold competently before uploading the new version with FTP – otherwise the old elements will remain in /shortcode folder and be duplicate, which breaks the theme.
Please include FTP access in the Private Content area.Best regards,
MikeMarch 22, 2018 at 12:38 pm #931210Yes, I did not update the theme via FTP. I’ve just used the atomatic process in the wordpress dashboard.
Do you need it anyway?Luca
March 22, 2018 at 12:56 pm #931223Hi,
Yes please, I have found that your css seems to be missing some rules for the icon list, when I test with my version the icon-list shows correctly. Please see screenshot in Private Content area of my test.Best regards,
MikeMarch 22, 2018 at 1:13 pm #931244Yes, that’s exacly how it should be.
March 23, 2018 at 3:04 am #931742Hi,
I found you were missing these 30 lines of code, so I added it in for you.
Please clear your browser cache and check.Best regards,
MikeMarch 23, 2018 at 11:32 am #931919Hi Mike,
I’ve checked and the icon list works perfectly. The icons became smaller on mobiles, so thank you again!Now just the last thing. As you can see in the screenshot, the squares around the magazine-element images are bigger than normal. I made some changes in the past to make those images bigger but after the update it’s not working anymore.
So now I’ve just made some test to restore it:
– I’ve changed the dimensions of thumbnail from 80×80 to 160×128 (with the plug in “simple image sizes”)
– I’ve tried to follow the suggestions of this old topic: https://kriesi.at/support/topic/how-to-modify-magazine-immages-size/
– I’ve tried to modify the pixels numers in this CSS i’ve in the style.css:.av-magazine-thumbnail { width: 150px; height: 120px; }
But anyway I can find a way to restore the situation as it was before the child theme.
I don’t know if I0ve been clear enough. Please see the screeshot attached to better understand.
Thank you so much for you kind help!
Luca
March 23, 2018 at 2:13 pm #931970Hi,
I have replaced your css with this to remove the padding and margin so it would be a better fit for the element:.av-magazine-thumbnail a img { width: 120px!important; height: 120px!important; margin: 0px !important; } .av-magazine-thumbnail { width: 120px!important; height: 120px!important; padding: 0px !important; }
Please clear your browser cache and check.
This will effect all of these elements site wide, typically I recommend limiting such changes to certain pages or elements to reduce conflicts, if you find issues with this elsewhere please let us know so we can adjust for you.Best regards,
MikeMarch 23, 2018 at 3:05 pm #931990Hi,
I think we are closer to the solution. This CSS is now working on the entire website but I’ve noticed one thing.All the thumbnails of the magazine element are now squares (120px x 120px). I modified both your CSS codes to make them 150px x 100px but it doensn’t seems to work (even clearing the cache).
So can you please explain me how to do this change? I don’t really understand what’s wrong.March 24, 2018 at 4:40 pm #932377Hi,
Opps, in my testing before I had the css in WordPress > Customize > Additional CSS.
Please check now.Best regards,
MikeMarch 24, 2018 at 5:11 pm #932387Hi Mike,
Now everything is working!I saw that the code is both in the Additional CSS and in the style.css file. Should I remove it from the style.css or should I just leave it in both?
Thank you so much for your fast and professional help!
Luca
March 24, 2018 at 5:28 pm #932399March 24, 2018 at 6:21 pm #932444Ok I will.
Thanks again Mike, I really appreciate the help you gave me.Have a nice day
Luca.
March 24, 2018 at 7:12 pm #932455Hi,
You also have a great day!
Glad we were able to help, we will close this now. Thank you for using Enfold.For your information, you can take a look at Enfold documentation here
and the video tutorials here
And if there are features that you wish Enfold had, you can request them and vote the requested ones here
For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)Best regards,
Mike -
AuthorPosts
- The topic ‘Few css problems after update to the 4.2.6’ is closed to new replies.