About padcosbmy
Rank 138759
111 followers Joined March 2016
Hi, My name is David and I'm an Affiliate Marketer.... There, I said it! I wasn't always an affiliate marketer but I have been working partime online

Posts

0

Questions

3

Login
Create Your Free Wealthy Affiliate Account Today!
icon
4-Steps to Success Class
icon
One Profit Ready Website
icon
Market Research & Analysis Tools
icon
Millionaire Mentorship
icon
Core “Business Start Up” Training
asked in
Website Development & Programming
Updated

they claim to be wordpress experts but I had better response form my old hosting company, at least they solved my problem not passed in off to the members as they do here... to

What version of WordPress are you having trouble with? Is it the latest version? If so, there are numerous issues.

Hi, Thanks for responding. I've sorted the error by re-installing the theme. Support did eventually suggest this option.

The error was caused by the facebook javascript SDK in my header.php which broke the body code. I have now installed the sdk script in a sidebar widget and it works fine.

See more comments

Why doesn't support help with php code errors?

Why doesn't support help with php code errors?

asked in
Website Development & Programming
Updated

they claim to be wordpress experts but I had better response form my old hosting company, at least they solved my problem not passed in off to the members as they do here... to

What version of WordPress are you having trouble with? Is it the latest version? If so, there are numerous issues.

Hi, Thanks for responding. I've sorted the error by re-installing the theme. Support did eventually suggest this option.

The error was caused by the facebook javascript SDK in my header.php which broke the body code. I have now installed the sdk script in a sidebar widget and it works fine.

See more comments

asked in
Everything Wordpress
Updated

class="home blog logged-in admin-bar no-customize-support custom-background custom-font-enabled single-author">

This appears at the top of each page and is page relev

Hi Marion,

Facebook instructions are to Include the JavaScript SDK on your page once, ideally right after the opening <body> tag. This is where i placed the script.

I have done this before without errors, but this time it broke!

Where else can I place it in php files as I have no html files to edit.

It looks like you added the code in the <body> not the header. You should always create a child theme for adding code. This explains child themes

What's your website? Is there a page I can look at?

Looks like you might have copied and pasted some extra code:

[removed](function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.6&appId=407405669386434";
fjs[removed].insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));[removed]
class="home blog custom-background custom-font-enabled single-author">

The actual code should only be within the [removed][removed] tags. The other: class="home blog custom-background custom-font-enabled single-author"> you can remove.

Bah, they stripped out my code. See attachment for the code.

Thanks but I cannot see that code in my header.php file as you describe. The following code is all there is <?php body_class(); ?>>

Am I looking in the correct file?

When you said you installed the Facebook Javascript SDK script, where did you add it?

Looks like you fixed it

I can see where you are in the .html source code but I can't see any html files in my editor. Where can I edit the html files?

Hi, Still not fixed..

I added the javascript here..
<body>


[removed](function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.6&appId=407405669386434";
fjs[removed].insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));[removed]
<?php body_class(); ?>>


<header id="masthead" class="site-header" role="banner">
<?php if ( get_theme_mod( 'themonic_logo' ) ) : ?>

I don't think it'll be in the actual HTML/PHP files. If you installed something most likely it'll be a plugin or widget. Where did you add the Facebook Javascript SDK script? That's where you should be looking.

I added that in the header.php as above but cannot see where the problem is there. I can see the code in the html but cannot edit that.

Yes it may be a plugin or other widget that has a conflict.

going off line now will look again later.

Thanks for your help

yeah sorry, i was looking at the wrong site. Maybe try uninstalling that plugin to see if the issue goes away. If not, It might be something not related to that plugin.

Looking at the code, it looks like it's a broken tag. Meaning that the front part has been deleted as tags start with


I think I found it. You added the Facebook script in the wrong place and broke the <body> tag. Look at the attachment. The top is what it should look like, highlighted in red.
The bottom part is what it looks like now. You added the Facebook script in between the <body tag instead of before it.

The thing is, I don't know exactly where it is but I suspect it's in the header.php file. Just look for the <div id="fb-root"> tag.

Hope that helps, if not, copy the code that's in the header.php in notepad or something and attach it here and I'll take a look.

Hi, Yes I see what you mean. Unfortunately I have no html file to edit, just php. I have removed the facebook script but that doesn't seem to make any difference now.
I can work things out in html but php is beyond me...

I was going to attach the header.php file with fb script included, you can see if you spot any code error., but this chat won't allow it. I attach a screen shot instead.

If I uninstall the theme and reinstall a new version maybe that will fix the error.

Thanks again

Hi David, I just woke up. Thanks for the screenshot.
I don't really know PHP either but I found your problem.
See the attachment for details but basically you added the Facebook code in between a code that was supposed to be together. Since this message strips out code, I added an attachment.
Just fix the top body code and remove the bottom code as highlighted and it should work.

Let me know if it works.

Just wondering if you were able to fix the problem. I was able to identify the issue when you sent me the header.php code

See more comments

Can anyone identify where this code error is?

Can anyone identify where this code error is?

asked in
Everything Wordpress
Updated

class="home blog logged-in admin-bar no-customize-support custom-background custom-font-enabled single-author">

This appears at the top of each page and is page relev

Hi Marion,

Facebook instructions are to Include the JavaScript SDK on your page once, ideally right after the opening <body> tag. This is where i placed the script.

I have done this before without errors, but this time it broke!

Where else can I place it in php files as I have no html files to edit.

It looks like you added the code in the <body> not the header. You should always create a child theme for adding code. This explains child themes

What's your website? Is there a page I can look at?

Looks like you might have copied and pasted some extra code:

[removed](function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.6&appId=407405669386434";
fjs[removed].insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));[removed]
class="home blog custom-background custom-font-enabled single-author">

The actual code should only be within the [removed][removed] tags. The other: class="home blog custom-background custom-font-enabled single-author"> you can remove.

Bah, they stripped out my code. See attachment for the code.

Thanks but I cannot see that code in my header.php file as you describe. The following code is all there is <?php body_class(); ?>>

Am I looking in the correct file?

When you said you installed the Facebook Javascript SDK script, where did you add it?

Looks like you fixed it

I can see where you are in the .html source code but I can't see any html files in my editor. Where can I edit the html files?

Hi, Still not fixed..

I added the javascript here..
<body>


[removed](function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.6&appId=407405669386434";
fjs[removed].insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));[removed]
<?php body_class(); ?>>


<header id="masthead" class="site-header" role="banner">
<?php if ( get_theme_mod( 'themonic_logo' ) ) : ?>

I don't think it'll be in the actual HTML/PHP files. If you installed something most likely it'll be a plugin or widget. Where did you add the Facebook Javascript SDK script? That's where you should be looking.

I added that in the header.php as above but cannot see where the problem is there. I can see the code in the html but cannot edit that.

Yes it may be a plugin or other widget that has a conflict.

going off line now will look again later.

Thanks for your help

yeah sorry, i was looking at the wrong site. Maybe try uninstalling that plugin to see if the issue goes away. If not, It might be something not related to that plugin.

Looking at the code, it looks like it's a broken tag. Meaning that the front part has been deleted as tags start with


I think I found it. You added the Facebook script in the wrong place and broke the <body> tag. Look at the attachment. The top is what it should look like, highlighted in red.
The bottom part is what it looks like now. You added the Facebook script in between the <body tag instead of before it.

The thing is, I don't know exactly where it is but I suspect it's in the header.php file. Just look for the <div id="fb-root"> tag.

Hope that helps, if not, copy the code that's in the header.php in notepad or something and attach it here and I'll take a look.

Hi, Yes I see what you mean. Unfortunately I have no html file to edit, just php. I have removed the facebook script but that doesn't seem to make any difference now.
I can work things out in html but php is beyond me...

I was going to attach the header.php file with fb script included, you can see if you spot any code error., but this chat won't allow it. I attach a screen shot instead.

If I uninstall the theme and reinstall a new version maybe that will fix the error.

Thanks again

Hi David, I just woke up. Thanks for the screenshot.
I don't really know PHP either but I found your problem.
See the attachment for details but basically you added the Facebook code in between a code that was supposed to be together. Since this message strips out code, I added an attachment.
Just fix the top body code and remove the bottom code as highlighted and it should work.

Let me know if it works.

Just wondering if you were able to fix the problem. I was able to identify the issue when you sent me the header.php code

See more comments

asked in
Keyword, Niche and Market Research
Updated

I, and our readers, would be very interested in finding out what products other people have had success with online, and why they chose that, or those, product(s) in the first

To me, being my fist website, it was no brainier, it had to be about the passion of my life, my dog, or rather his breed - though I am concerned it may not be the most marketable, I went along with kyle's advice to choose a niche that you love and you can enjoy. But I already have in mind my next niche, which of course might be to do with working from home

It's Great to be able to follow your passion GiulaB. Writing content for issues that you are passionate about is so much easier don't you find?

I have come to realise a lot of men are interested in Socks...colourful, patterned socks. It seems to be rising up in the fashion department and have made a few easy sales relating to socks because they're cheap and people buy more than a pair.

:))

Yes very true, hence the Sock Shops in airports around the world! Personally I seldom wear socks these days as I live virtually on the Equator, but in colder climes they are an essential clothing item and fashion accessory.

See more comments

What is your favourite product to market on the internet?

What is your favourite product to market on the internet?

asked in
Keyword, Niche and Market Research
Updated

I, and our readers, would be very interested in finding out what products other people have had success with online, and why they chose that, or those, product(s) in the first

To me, being my fist website, it was no brainier, it had to be about the passion of my life, my dog, or rather his breed - though I am concerned it may not be the most marketable, I went along with kyle's advice to choose a niche that you love and you can enjoy. But I already have in mind my next niche, which of course might be to do with working from home

It's Great to be able to follow your passion GiulaB. Writing content for issues that you are passionate about is so much easier don't you find?

I have come to realise a lot of men are interested in Socks...colourful, patterned socks. It seems to be rising up in the fashion department and have made a few easy sales relating to socks because they're cheap and people buy more than a pair.

:))

Yes very true, hence the Sock Shops in airports around the world! Personally I seldom wear socks these days as I live virtually on the Equator, but in colder climes they are an essential clothing item and fashion accessory.

See more comments

Login
Create Your Free Wealthy Affiliate Account Today!
icon
4-Steps to Success Class
icon
One Profit Ready Website
icon
Market Research & Analysis Tools
icon
Millionaire Mentorship
icon
Core “Business Start Up” Training