- This topic has 20 replies, 4 voices, and was last updated 1 year ago by
David.
-
AuthorPosts
-
September 11, 2019 at 9:47 am #1006967
David
Hello,
I received a notification from WordPress that I need to update my site to the latest PHP version. Does the current version of GeneratePress run the latest PHP?
Thank you.
September 11, 2019 at 9:49 am #1006970Leo
StaffCustomer SupportHi there,
Yes we always make sure GP is compatible with the latest version of PHP π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 11, 2019 at 9:59 am #1006981David
Hi Leo!
Thanks for your reply. Why does wordpress say I need to update my version of PHP then?
Thanks!
September 11, 2019 at 10:19 am #1006997Leo
StaffCustomer SupportThe PHP version of your site isn’t related to GP.
Your hosting should be able to update that for you π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 11, 2019 at 10:39 am #1007021David
Ok!
Thanks Leo!
September 11, 2019 at 10:46 am #1007034Leo
StaffCustomer SupportNo problem π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 7, 2020 at 4:46 am #1355038Vinod
Hello,
I had the same message from WordPress – it said my PHP version isn’t secure.So I updated to the latest version from the server side.
After upgrading, I get a gp-premium warning on all my blog posts. I had to roll it back to the ‘insecure’ version to get rid of the warning.
Warning: Use of undefined constant ID – assumed ‘ID’ (this will throw an Error in a future version of PHP) in /home/***/public_html/wp-content/plugins/gp-premium/elements/class-hooks.php(180) : eval()’d code on line 10
Please help.
July 7, 2020 at 6:14 am #1355123David
StaffCustomer SupportHi there,
Go to Appearance > Elements – do you have any Hooks that contain PHP? If so disable the hook by Quick Editing them and setting the status to draft.
Let us know if that resolves the error.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 7, 2020 at 6:41 am #1355153Vinod
The only hook which I seem to have put in, is a mailchimp pop-up — and that doesn’t seem to contain PHP.
(Sorry. Non-programmer here. I tested for PHP by just checking if the letters php appeared in the hook’s script. Guessing that’s the right way to tell if a hook ‘contains PHP’.)
The warning I mention is appearing in a single post’s sidebar. And I see that there is a hook titled ‘Single Post Sidebar’.
But I think this hook came as part of the GP’s bold theme.
July 7, 2020 at 7:17 am #1355208David
StaffCustomer SupportCould you edit the Single Post Sidebar element. And copy and paste the code here.
Before submitting please highlight the code and hit the CODE button. This will preserve its formatting.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 7, 2020 at 7:44 am #1355236Vinod
<div class="author-box"> <?php global $post; ?> <div class="avatar"><?php echo get_avatar( get_the_author_meta( ID )); ?></div> <h5 class="author-title"><?php printf( esc_attr__( 'About %s', 'the author' ), get_the_author_meta( 'display_name') );?></h5> <div class="author-summary"> <p class="author-description"><?php echo wp_kses( get_the_author_meta( 'description' ), null ); ?></p> <div class="author-links"> <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="Read more"> Read more of my posts. </a> </div> </div> </div>
Hoping that the code copy-pasting worked.
July 7, 2020 at 7:47 am #1355241Vinod
<div class="avatar"><?php echo get_avatar( get_the_author_meta( ID )); ?></div>
I suspect this line to be throwing the warning. Because the warning appears right above the ‘Author-title’ in the sidebar for the single post page… I could be wrong.
Edit: And I just realized this is ‘line 10’ of the hook’s script, and the warning mentions line 10. So probably more likely it’s this.
July 7, 2020 at 8:12 am #1355442David
StaffCustomer SupportTry replacing the code with:
<div class="author-box"> <div class="avatar"> <?php global $post; $author_id = $post->post_author; echo get_avatar( $author_id ); ?> </div> <h5 class="author-title"> <?php printf( esc_attr__( 'About %s', 'the author' ), get_the_author_meta( 'display_name') );?> </h5> <div class="author-summary"> <p class="author-description"><?php echo wp_kses( get_the_author_meta( 'description' ), null ); ?></p> <div class="author-links"> <a href="<?php echo get_author_posts_url( get_the_author_meta( $author_id ) ); ?>" title="Read more">Read more of my posts.</a> </div> </div> </div>
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 7, 2020 at 4:54 pm #1355860Vinod
Thank you David. That seems to have worked.
July 8, 2020 at 2:46 am #1356177David
StaffCustomer SupportThanks for testing – we’ll get the Site Library updated.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.