[Support request] Generatepress and Elementor pro wont work togheter

Home Forums Support Generatepress and Elementor pro wont work togheter

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #582959
    Tom
    Lead Developer
    Lead 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;
    		}
    	}
    }
    #582972
    Jonas

    prfct, 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 Elementor

    #582977
    Tom
    Lead Developer
    Lead Developer

    Did you make the change above? If so, is everything back to normal? 🙂

    #583006
    Jonas

    Had 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.
    J

    #593660
    Jonas

    Hi Tom,

    Any news on this issue?

    Jonas

    #594169
    Tom
    Lead Developer
    Lead Developer

    It’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/

Viewing 6 posts - 16 through 21 (of 21 total)
  • You must be logged in to reply to this topic.