-
AuthorPosts
-
February 15, 2023 at 11:50 am #1398050
Hello, I’m using enfold photography demo. How can I add a image under the social media buttons?
Thanks in advance
February 15, 2023 at 1:49 pm #1398078Hey troupdim,
The Photography Demo uses a sidebar header, so please see our documentation for Adding a header widget area, this will place the image before the social icons:
to move it after the social icons try adding a script like this to the end of your child theme functions.php file in Appearance ▸ Editor:function custom_script() { ?> <script> window.addEventListener('DOMContentLoaded', function() { (function($) { $('#header_main #media_image-2').css({'padding':'0'}).detach().insertAfter($('.av-sidebar-social-container').css({'border-bottom':'1px solid #e1e1e1'})); })(jQuery); }); </script> <?php } add_action('wp_footer', 'custom_script');
please note that your image widget ID maybe different, if you need help adjusting please link to your page so we can examine.
This is the expected results:
Best regards,
MikeFebruary 15, 2023 at 2:15 pm #1398079I need help. I send in private content my username & password.
- This reply was modified 1 year, 10 months ago by troupdim.
February 15, 2023 at 6:31 pm #1398112February 15, 2023 at 9:55 pm #1398136Hello, thanks a lot. I have change the photo. However, in english version of my site the image is below the social media buttons and menu area, while in greek version the image is above social media buttons. How can I fix it?
- This reply was modified 1 year, 10 months ago by troupdim.
February 16, 2023 at 12:33 am #1398145Hi,
I adjusted the script to this to account for the languages:function custom_script() { ?> <script> window.addEventListener('DOMContentLoaded', function() { (function($) { $('html[lang="en-GB"] #header_main #media_image-4').css({'padding':'0'}).detach().insertAfter($('.av-sidebar-social-container').css({'border-bottom':'1px solid #e1e1e1'})); $('html[lang="el"] #header_main #media_image-5').css({'padding':'0'}).detach().insertAfter($('.av-sidebar-social-container').css({'border-bottom':'1px solid #e1e1e1'})); })(jQuery); }); </script> <?php } add_action('wp_footer', 'custom_script');
Please clear your browser cache and check.
Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.