-
AuthorPosts
-
November 29, 2018 at 10:35 pm #1039160
Hello,
I can’t add code to my child theme and I can’t find the solution. The code (for Facebook Pixel and Adsense) I tried to insert, I found here in this forum, so it should be correct. But it shows an error message. What should I do? And how can I attach an image so you can see the message?
Thanks in advance.
Best wishes
LinaDecember 2, 2018 at 6:17 am #1039783Hey linaschneider,
What code are you trying to add and where? Please try to be as specific as possible. If you need to post screenshots then you can upload to a service like Google Drive, Dropbox, Imgur, Snaggy etc and then link to them here.
Best regards,
RikardDecember 3, 2018 at 6:29 pm #1040432Hey Rikard,
thank you for your reply. I tried to add the code for the Facebook Pixel and Adsense (see private content).
Best wishes,
LinaDecember 4, 2018 at 8:24 am #1040607Hi Lina,
Thanks for that. I can’t see anything wrong with your functions though, what exactly is not working after adding them?
Are you referring to the error message in the screenshot? If so, did you try to add your code using FTP instead? That is a WordPress error message, so it’s not theme related.
Best regards,
RikardDecember 4, 2018 at 8:25 am #1040608Hi again,
I see that you are trying to add shortcode in the second function, is that deliberate or are you only looking to add the script? Should the scripts be added to the header or the footer of the page?
Best regards,
RikardDecember 14, 2018 at 1:03 am #1045085Hey,
thanks for your reply. How do I add code using FTP (what is that anyway)?
In the description of Adsense and Facebook, it says that the code should be added to the header. But when I tried to find the location of the header using this forum, several threads said to add it to the functions.php in the way I did. So what is the correct way to add the Facebook Pixel and Adsense Code?Best regards,
LinaDecember 14, 2018 at 1:13 am #1045088Hi Lina
Just stumbled upon your thread here.
How do I add code using FTP (what is that anyway)?
FTP means File Transfer Protocol, see https://de.wikipedia.org/wiki/File_Transfer_Protocol for details.
You can code (I would rather say edit a file) by uploading it via FTP into your theme or child theme folder within the themes folder. You can get your FTP credentials over your hoster PixelX (use SFTP if possible, that is more secure).Best,
MichaelDecember 15, 2018 at 5:39 am #1045534Hi Lina,
I’m not sure if you need any further help on the topic? Please let us know if you do. Thanks @michaelh for helping out :-)
Best regards,
RikardDecember 18, 2018 at 5:54 pm #1046952Hey,
thank you for your messages, but my original question remains the same: What is the right code for the Facebook Pixel and Adsense? I’m sorry if you already answered this but I still don’t understand.
Where exactly can I find my FTP credentials over the hoster PixelX? I couldn’t locate them yet. What code am I supposed to upload via FTP? In the Child Theme editor, I don’t see any options to upload anything.Best,
LinaDecember 21, 2018 at 11:51 am #1048121Hi,
1.) You can get the FB pixel code from the facebook events manager panel:
// https://www.facebook.com/events_manager/
Once you got the code, you can either add it in the functions.php or install this plugin:
// https://wordpress.org/plugins/code-snippets/
Code example: https://pastebin.com/1fTgCStq
Make sure to update these lines because it contains your account’s pixel id:
fbq('init', '1233443242343454');
noscript:
src="https://www.facebook.com/tr?id=1233443242343454&ev=PageView&noscript=1"
2.) Where do you want to place your google ads? You can add it in a text block, code block, a widget or create a custom shortcode for it. Please post your adsense code in the private field.
3.) You should contact your hosting provider for the FTP account.
Best regards,
IsmaelJanuary 2, 2019 at 9:17 pm #1049379Hi Ismael,
thanks for your reply.
Unfortunately, the same error code is shown again when I try to add the code from the pastebin (with my Pixel ID) to the functions.php. I don’t know what I’m missing. Why can’t I add anything to the functions.php? :/ So I had to install the plugin, which worked.I have a much bigger problem now though because I can’t edit my pages anymore! The page building doesn’t work like it used to and a lot in the WP backend looks different. The preview of the page is sometimes correct, but live it differs. One example is this page: https://www.linaschneider.ch/angebote/angebot-3-entfaltung/ In the preview it looks (almost) correct, but live there is nothing.
I read in the forum that the theme needs to be up to date, but I can’t find out how to update the theme to 4.5.1 ( see the private content). Since this forum was closed for a long time, I need your help urgently!Thanks
Lina- This reply was modified 5 years, 10 months ago by linaschneider.
January 4, 2019 at 3:32 am #1049763Hi,
Did you remove the previous filter before adding the new one? Please post the WP and FTP details in the private field so that we can check the codes.
Best regards,
IsmaelJanuary 4, 2019 at 6:31 pm #1050081Hi Ismael,
thanks for your reply but I don’t really understand. Which filter should I remove and where? Where do I find the WP and FTP details so you can check it? Could you please explain in detail, preferably with screenshots?
I posted the link to the screen recording of the page in the private fields. As you can see there is content on the page and the preview shows it (almost) correctly. But live the page is empty: https://www.linaschneider.ch/angebote/angebot-3-entfaltung/
Best wishes
LinaJanuary 4, 2019 at 10:48 pm #1050113Hi Lina
I will try to help you partly as I can’t see the private content. Your question:
Where do I find the WP and FTP details so you can check it?
I don’t know what you mean by “WP details”, but as for FTP you can get your credentials over your hoster PixelX (use SFTP if possible, that is more secure), as I already stated in my post from December 14.
Thanks and cheers
MichaelJanuary 6, 2019 at 2:03 am #1050449Hello Michael,
thanks for your message. Since I couldn’t locate the FTP credentials, I contacted my hoster and am still waiting for their reply.
It’s really frustrating that I can’t use my website properly since the WP update and the answers I receive here just raise more questions.Best wishes
LinaJanuary 6, 2019 at 2:23 am #1050451Hi Lina
Sorry to hear that you could not locate your FTP credentials within your hosters panel.
How about switching to a Swiss hoster such as Cyon? They do a great job and it is really easy to find all the information you need.What kind of other questions do you have in mind?
Please let me know if I can help you somehow.Liebe Gruess
MichiJanuary 7, 2019 at 1:43 pm #1050871Hi,
The site is running on a very old version of the theme, version 3.8. You have to upgrade to version 4.5.2 and switch to the advance layout builder. The page is using the new block editor and that is why it’s blank.
Best regards,
IsmaelJanuary 9, 2019 at 6:24 pm #1051986Hi Ismael,
I know it’s an outdated version that’s why I asked you how to update it on the 2nd of January. At the Enfold Child Options it says it’s the latest version…
In the private content, you can find my login. I hope that’s what you need to access the page and find out what’s wrong.Best wishes
LinaJanuary 10, 2019 at 12:09 pm #1052305Hi,
Sorry I missed that information. You can’t update from that version automatically because it’s still using the deprecated version of the update script, so you have to do it manually via FTP. Here’s how:
// https://kriesi.at/documentation/enfold/install-enfold-theme/#reinstall-or-update-using-ftp
A short read about updating:
// https://kriesi.at/archives/the-complete-guide-to-updating-enfold
Best regards,
IsmaelJanuary 14, 2019 at 10:15 pm #1053853Hello Ismael,
thanks. MichaelH could help me out and fixed the website! So you can close the ticket. :)
Best regards
LinaJanuary 15, 2019 at 12:43 am #1053896 -
AuthorPosts
- You must be logged in to reply to this topic.