Hello, I’m using the XPro theme with its child theme, when checking the server log errors, I found the following one in private message, any idea bout the error and how to fix it? Thanks.
Hi,
Would you mind providing us with login credentials so we can take a closer look? Please provide following information:
Set it as Secure Note
- Link to your site
- WordPress Admin username / password
- FTP credentials
All the best!
Thank you for the reply, I’ve added the details in the private msg, please check the error as it cause overloading on PHP.
Note, the only thing I modified in the theme is removing the line of site title <h1…h1> to remove the duplicate h1 title tag in .brand.php file in the main XPro theme
framework/legacy/cranium/headers/views/global/
Hey there,
Please remove your modifications then check if the issue persists.
Having 2 h1 tags is a bad practice in SEO a long time ago but it not the case now in HTML5. Please see the links below for more details.
If you wish to continue with your modification, the correct way of doing it is to copy _brand.php
located in framework/legacy/cranium/headers/views/global/
to this folder in your child theme framework/views/global/
. Then, instead of removing the line completely, just change h1
to a different tag like div
.
Thanks.
Trust me, that’s not the case even if you see all these articles about multiple H1 tag, Bing said it clearly, it needs one single H1 tag on every page, so, even if that’s acceptable for Google, Bing will see it as a mistake that never help their crawlers. I tried changing it with the div tag, but unfortunately, I got black pages and everything looked emprty, so, I just copied the file in the location (child theme) and removed that line.
Hi There,
When I check, on your current pro-child theme, _brand.php is located on this folder:
/wp-content/themes/pro-child/framework/views/global
Please note that there’s changes in the structure and it should be located here:
/wp-content/themes/pro-child/framework/legacy/cranium/headers/views/global
Then can you also try to clear cache first? I just found it weird that the error is pointing to an X theme file while your current site theme is Pro. The error should point to your active theme. Which page exactly are you getting black pages?
Thanks for your explanation Lely, you’re right, I found the file in the wrong location, so, I created the subfolders in the child theme exactly as the same way the pro theme, also, I found the not used x-child still there because I removed the parent theme, so, it was hidden but not active, so, I removed it, and hope the error disappears.
Now, for the h1 tag is the. brand.php file, do you have any suggestion to remove it? I mean keep the same line but with other tag ( <h1>.....</h1>
? )
<?php echo '<h1 class="visually-hidden">' . $site_name . '</h1>'; ?>
I tried <div… And it doesn’t work.
So, maybe because I removed that entire line, I got the errors.
Hi,
You may remove the entire line of code.
<?php echo '<h1 class="visually-hidden">' . $site_name . '</h1>'; ?>
Thanks
Hi, thanks, I removed that line already, for the error, I checked the log file and it still talks about the line 18 in the index.php
file in the xpro theme folder, I mean this line:
<?php x_get_view( x_get_stack(), 'wp', 'index' ); ?>
Is it correct or missing anything ?
Hi There,
The FTP credentials you provided above does not work anymore and your login dashboard /wp-admin/ says This has been disabled. Please confirm.
Did you do any modification on that file index.php
? If not, then most likely the issue is not coming from that file. Please see the time when the issue occur and remember what you’re doing on the site that time, it might give you a clue of what is causing the error.
It can be a plugin conflict, please do a testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.
Let us know how it goes!