- This topic has 25 replies, 3 voices, and was last updated 7 years, 2 months ago by Leo.
-
AuthorPosts
-
January 14, 2017 at 11:13 pm #264184TomLead DeveloperLead Developer
I don’t I’m afraid. Did you try tweaking the code using the instructions above?
January 15, 2017 at 8:06 pm #264426ScottI’m hopeless at this. I added the code at the end of the functions.php file with the changes you suggested, and the whole site went blank.
So I restored the old file and it is back up.
I’ll have to find a developer to help. Know anyone good?
January 15, 2017 at 11:48 pm #264444TomLead DeveloperLead DeveloperThis should be your full function:
add_action('admin_init', 'set_user_metaboxes'); function set_user_metaboxes($user_id=NULL) { // These are the metakeys we will need to update $meta_key['hidden'] = 'metaboxhidden_post'; // So this can be used without hooking into user_register if ( ! $user_id) $user_id = get_current_user_id(); // Set the default hiddens if it has not been set yet if ( ! get_user_meta( $user_id, $meta_key['hidden'], true) ) { $meta_value = array('generate_page_header_meta_box'); update_user_meta( $user_id, $meta_key['hidden'], $meta_value ); } }
From looking at the code, the user would have to login to their account for the code to run.
January 16, 2017 at 3:57 pm #264753ScottNope, still get a white screen. I’m putting this at the very end of the functions.php file, the one in the parent them (main theme) folder called /generatepress, is that right?
January 16, 2017 at 7:51 pm #264820TomLead DeveloperLead DeveloperTry adding it like this: https://docs.generatepress.com/article/adding-php/
Just tried and I’m not getting any errors.
January 17, 2017 at 8:16 pm #265265ScottOK, tried it and generated a fatal error on the plugin, which deactivated it, so tried it via code snippets and it killed my site. *grrrr*
January 17, 2017 at 10:07 pm #265283TomLead DeveloperLead DeveloperWhat was the exact fatal error? That function didn’t cause any errors on my local server.
I’m afraid if it doesn’t work I’m out of ideas for the time being.
In the next version of GP Premium you’ll be able to set the Page Header to only display to a certain user capability.
January 18, 2017 at 3:24 pm #265560ScottOK, so I tapped the developer who wrote our books plugin and she was able to fix things. But I wanted to thank you for trying so hard and for going above and beyond what you had to do, even if it didn’t work out. It is still much appreciated.
January 18, 2017 at 9:56 pm #265645TomLead DeveloperLead DeveloperNo problem – I’m glad you were able to get it working 🙂
January 25, 2017 at 10:48 pm #268861ScottOne more issue. Trying to update GP Premium to 1.2.94 and am getting this:
An error occurred while updating GP Premium: Download failed. Unauthorized
I do have my license key entered. ?
Thanks!
January 25, 2017 at 10:50 pm #268862LeoStaffCustomer SupportThis should help: https://docs.generatepress.com/article/updating-issues/#getting-an-unauthorized-message
or you’ve already done that?
-
AuthorPosts
- You must be logged in to reply to this topic.