- This topic has 20 replies, 4 voices, and was last updated 5 years, 10 months ago by Tom.
-
AuthorPosts
-
May 23, 2018 at 1:27 pm #582959TomLead DeveloperLead Developer
Yes, here’s the fix if you don’t want to wait for the update.
1. Open wp-content/plugins/gp-premium/page-header/functions/functions.php
2. On line 135, find this block of code:
if ( is_tax() || is_category() || is_tag() && ! $id && ! is_singular() ) { if ( isset( $global_locations[ get_queried_object()->taxonomy ] ) && '' !== $global_locations[ get_queried_object()->taxonomy ] && ! $id ) { $id = $global_locations[ get_queried_object()->taxonomy ]; if ( 'publish' !== get_post_status( $id ) ) { $id = false; } } $tax_post_id = get_term_meta( get_queried_object()->term_id, '_generate-select-page-header', true ); if ( '' !== $tax_post_id && 'publish' == get_post_status( $tax_post_id ) ) { $id = $tax_post_id; } }
And replace it with:
if ( is_tax() || is_category() || is_tag() && ! $id && ! is_singular() ) { $queried_object = get_queried_object(); if ( is_object( $queried_object ) ) { if ( isset( $global_locations[ $queried_object->taxonomy ] ) && '' !== $global_locations[ $queried_object->taxonomy ] && ! $id ) { $id = $global_locations[ $queried_object->taxonomy ]; if ( 'publish' !== get_post_status( $id ) ) { $id = false; } } $tax_post_id = get_term_meta( $queried_object->term_id, '_generate-select-page-header', true ); if ( '' !== $tax_post_id && 'publish' == get_post_status( $tax_post_id ) ) { $id = $tax_post_id; } } }
May 23, 2018 at 1:47 pm #582972Jonasprfct, you’r a legend, I am stocked by your support, never change!
Over at Elementor I got answers on the questions I didn’t ask and ended up with this:
Vincent replied
May 23, 16:40
Hi Jonas,You are correct currently the developers decided to disable the metabox capability with the generatepress filter generate_metabox_capability. This move seems intentional to prevent layout issue, by removing those options for the user.
You can report this as an issue/feature request on our GitHub project page, so the developers may consider reenabling this option.
Kind Regards,
—
Vincent from ElementorMay 23, 2018 at 1:51 pm #582977TomLead DeveloperLead DeveloperDid you make the change above? If so, is everything back to normal? ๐
May 23, 2018 at 2:28 pm #583006JonasHad a quick try but it didn’t work unfortunately, I can’t try more for the next few day’s as I have to work ๐
and my server went down last night grrr()*&E(#%$$*$()*@#()_$@(#)$, but that is because i’m an idiot!Trying again in a couple of days time.
JJune 6, 2018 at 9:36 pm #593660JonasHi Tom,
Any news on this issue?
Jonas
June 7, 2018 at 8:57 am #594169TomLead DeveloperLead DeveloperIt’s scheduled for GPP 1.7, which we’re hoping to get out later this month.
We tested the above and it worked on all of our sites. Feel free to send us temporary admin login details and I can switch out the code for you: https://generatepress.com/contact/
-
AuthorPosts
- You must be logged in to reply to this topic.