Archived topic
Is there a way to suppress Image/Content/Logo?
25 replies · Started by Scott on January 7, 2017
I don't I'm afraid. Did you try tweaking the code using the instructions above?
I'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?
This 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.
Nope, 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?
Try adding it like this: https://docs.generatepress.com/article/adding-php/
Just tried and I'm not getting any errors.
OK, 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*
What 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.
OK, 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.
No problem - I'm glad you were able to get it working :)
One 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!
This should help: https://docs.generatepress.com/article/updating-issues/#getting-an-unauthorized-message
or you've already done that?