Site logo

Archived topic

Php error

3 replies · Started by Galiena on March 18, 2021

Viewing posts 1–4 of 4

Hi there,
I have the premium version of generatepress but get a php error.

AH01215: PHP Warning: Use of undefined constant \xe2\x80\x99__return_true\xe2\x80\x99 -
assumed '\xe2\x80\x99__return_true\xe2\x80\x99' (this will throw an Error in a future
version of PHP) in
/mnt/web501/b1/62/58120062/htdocs/STRATO-apps/wordpress_04/app/wp-content/themes/generatepress_child/functions.php
on line 66:
/home/strato/http/premium/rid/00/62/58120062/htdocs/STRATO-apps/wordpress_04/app/index.php

I understand from hosting provider that it seems like the problem is because I am are running on a wrong PHP version. This version of gereratepress would need an older php version. Can you tell me which php version would work correctly with generate press?

I already have a slightly older version: PHP 7.3
the 7.4 and the 8.0 versions are also possible.

Hi there,

That looks like an error in the function.php in your child theme?

I don't believe you would get the error when using the parent theme.

Mmmzzzz, but line is added on an earlier suggestion in another forum topic. On line 66:

add_filter( ‘generate_sections_sidebars’,’__return_true’ );

This was because my sidebar was not showing up on pages where I use sections. Original post ##809925

Hmm can you try this snippet instead?

add_action( 'wp', function() {
    add_filter( 'generate_sections_sidebars', '__return_true' );
} );
This archived topic is closed to new replies.