-
AuthorPosts
-
November 17, 2015 at 6:57 am #668270
Hello
I am getting this error lately:
Error: Please fix your theme to make plugins work correctly: Go to the theme Editor and insert <?php wp_head(); ?> just before the </head> line of your theme’s header.php file.
I deactivated all non X plugins and then one-by-one reactivated them. It seems the error is caused by a plugin, ‘Ultimate Social Media Plus’. When it’s active I get the error.
I also get an error about the topbar.php in my Cpanel error file:
[17-Nov-2015 11:20:06 UTC] PHP Fatal error: Call to undefined function pll_the_languages() in /home/helloeng/public_html/wp-content/themes/x-child/framework/views/global/_topbar.php on line 21This is line 21: <?php pll_the_languages();?>
It looks like it relates to Polylang, but I de- and reactivated Polylang and it did not appear to have anything to do with the error.
I’m using X, currently Icon, the only custom CSS I have at the moment is:
.x-topbar .x-social-global{
display:none;
}
.lang-item {
display: inline;
}
.lang-item {
list-style: none;
}Would appreciate some help.
November 17, 2015 at 7:11 am #668290Hi,
Thanks for writing in!
wp_head(); is already added in our theme header.
You can check the file wp-content/themes/x/framework/views/global/_header.php Line number 16
It sounds like you might be having an issue with a third party plugin or script. Regretfully, we cannot provide support for third party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.
Thank you for your understanding.
November 17, 2015 at 7:48 am #668350Yes I see it’s already in the header.
What about the <?php pll_the_languages();?> in the X _topbar.php? Is this code correct? I mean I got the language switcher code in the topbar.php from X support staff. So why would it give me an error with “undefined” function?
PHP Fatal error: Call to undefined function pll_the_languages() in /home/helloeng/public_html/wp-content/themes/x-child/framework/views/global/_topbar.php on line 21
From an X perspective, there is no reason why <?php pll_the_languages();?> should cause an error, right?
<?php
// =============================================================================
// VIEWS/GLOBAL/_TOPBAR.PHP
// —————————————————————————–
// Includes topbar output.
// =============================================================================?>
<?php if ( x_get_option( ‘x_topbar_display’, ” ) == ‘1’ ) : ?>
<div class=”x-topbar”>
<div class=”x-topbar-inner x-container max width”>
<?php if ( x_get_option( ‘x_topbar_content’ ) != ” ) : ?>
<p class=”p-info”><?php echo x_get_option( ‘x_topbar_content’ ); ?></p>
<?php endif; ?>
<?php x_social_global(); ?><ul class=”language-switcher right”>
<?php pll_the_languages();?></div>
</div><?php endif; ?>
November 17, 2015 at 7:58 am #668364Hi there,
Please provide us with URL of thread which provided language switcher code.
Thanks.
November 17, 2015 at 8:06 am #668386November 17, 2015 at 8:28 am #668416Hi There,
Please update your code to this:
<?php // ============================================================================= // VIEWS/GLOBAL/_TOPBAR.PHP // ----------------------------------------------------------------------------- // Includes topbar output. // ============================================================================= ?> <?php if ( x_get_option( 'x_topbar_display', '' ) == '1' ) : ?> <div class="x-topbar"> <div class="x-topbar-inner x-container max width"> <?php if ( x_get_option( 'x_topbar_content' ) != '' ) : ?> <p class="p-info"><?php echo x_get_option( 'x_topbar_content' ); ?></p> <?php endif; ?> <?php x_social_global(); ?> <ul class="language-switcher right"> <?php if(function_exists('pll_the_languages')){ pll_the_languages(); } ?> </ul> </div> </div> <?php endif; ?>
Hope it helps 🙂
November 17, 2015 at 10:52 am #668654I changed the file and will see if that gets rid of the php error:
PHP Fatal error: Call to undefined function pll_the_languages() in /home/helloeng/public_html/wp-content/themes/x-child/framework/views/global/_topbar.php on line 21Thanks!
November 17, 2015 at 11:07 am #668672PS: I’m still getting this one: Error: Please fix your theme to make plugins work correctly: Go to the theme Editor and insert <?php wp_head(); ?> just before the </head> line of your theme’s header.php file.
I contacted the plugin people about it, hopefully they have an idea what’s causing it.
I hope that the <?php wp_head(); ?> error and the undefined function pll_the_languages() error are not related.
November 17, 2015 at 11:30 am #668701Hi There,
In this case, would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link login to your site
– WordPress Admin username / Password
– FTP AccountDon’t forget to select Set as a private reply. This ensures your information is only visible to our staff.
Thanks.
November 17, 2015 at 11:51 am #668728This reply has been marked as private.November 17, 2015 at 12:42 pm #668809Hi there,
Kindly set the user as an admin user and please provide us with your FTP details so that we can check this further. Thank you.
November 17, 2015 at 1:07 pm #668854This reply has been marked as private.November 17, 2015 at 2:17 pm #668965Hi there,
Yes, that will do. Thank you.
November 17, 2015 at 2:38 pm #668981This reply has been marked as private.November 17, 2015 at 5:30 pm #669167Hi There,
Thanks for the credentials. But as you already know this is an Ultimate Social Media plugin issue. Regretfully, we cannot provide support for third party plugins due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.
Or you could use the X native Social Sharing element.
Thank you for your understanding.
-
AuthorPosts