-
AuthorPosts
-
June 28, 2022 at 12:59 pm #1356713
Hi Guys,
I’ve noticed that our social media icons, that would normally display in the footer under our logo, have disappeared. It has done this before after an enfold update and I have simply added the code back into the functions.php file and they come back.
However, this time I have received the following error message and cannot update the file.
“Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.”
Do you know what this is and how to fix it?
Any help would be appreciated.
Thanks,
MattJune 28, 2022 at 1:17 pm #1356717Hi Matt,
That is a WordPress error message, it’s not coming from the theme. Please try adding your code via FTP instead.
Best regards,
RikardJune 28, 2022 at 1:20 pm #1356718Hi Rikard,
Thanks for the quick response. I will try adding the code via FTP.
Thanks,
MattJune 28, 2022 at 3:23 pm #1356733Hi,
Thanks for the update. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardJune 30, 2022 at 11:05 am #1356927But this is not an error message that you can not write, but that the inserted was faulty. Therefore check the snippet for errors.
Are all quotation marks correct? not curved quotation marks but straight ones! – do all opening brackets also have closing equivalents? etc. pp.June 30, 2022 at 11:19 am #1356930Hi Guenni,
Thanks for the reply.
I below is the code that I have used in the past. I have just tested it on our staging site too and it works.
function font_awesome_styles() {
wp_enqueue_style( ‘Font-awesome’, ‘//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css’ );
}
add_action( ‘wp_enqueue_scripts’, ‘font_awesome_styles’ );function insert_frontside_image(){
?>
<script>
(function($){
$(document).ready(function(){
$(‘.icongrid-frontimage .article-icon-entry .avia-icongrid-front’).each(function(){
var backside_img = $(this).next().find(‘img:first-child’).attr(‘src’);
$(this).find(‘.avia-icongrid-icon’).css(‘display’, ‘none’);
$(this).prepend(‘<div class=”frontside_background”></div>’);
$(this).find(‘.frontside_background’).css({
‘background-image’: ‘url(‘+backside_img+’)’,
})
});
});
})(jQuery);
</script>
<?php
}
add_action(‘wp_footer’, ‘insert_frontside_image’);Let me know what you think it may be.
Thanks,
MattJune 30, 2022 at 12:28 pm #1356937Hi Matt,
As far as I know, this is not really an error, it’s only WordPress letting you know that it couldn’t write the changes you made to the file in question. Please try to add your code using FTP instead.
If you should have problems with the code, then make sure that all your quotes are “straight” ones, like @guenni007 pointed out. But then again, if the code works on your staging site, then it should work on your live site as well.
Best regards,
RikardJune 30, 2022 at 12:48 pm #1356945ha _ :lol: i have a Déjà-vu :
https://kriesi.at/support/topic/image-flip-box/#post-1342764 and https://webers-testseite.de/icongrid-with-frontimage/can not see if all is o.k. because when not using code tag here on board – a lot of signs are transfered to something else – but if you copy&paste it from here: Link – all will be o.k.
by the way : fontawesome is now on 6.11 and hosted on
https://www.jsdelivr.com/June 30, 2022 at 3:24 pm #1356956 -
AuthorPosts
- You must be logged in to reply to this topic.