• BackuPs

    (@backups)


    calling $post_type_name = get_query_var( ‘post_type’ ); when elementor is active returns a array even in pages that are not using elementor. This is incorrect !!!

    <small></small>
    			<b>array</b> <i>(size=3)</i>
    			  0 <font color="#888a85">=></font> <small>string</small> <font color="#cc0000">'post'</font> <i>(length=4)</i>
    			  1 <font color="#888a85">=></font> <small>string</small> <font color="#cc0000">'page'</font> <i>(length=4)</i>
    			  2 <font color="#888a85">=></font> <small>string</small> <font color="#cc0000">'e-landing-page'</font> <i>(length=14)</i>
    			

    array (size=3)
    0 => string ‘post’ (length=4)
    1 => string ‘page’ (length=4)
    2 => string ‘e-landing-page’

    This message shows in pages and posts that have been created or saved after elementor was activated. Even if they are not elementor pages.

    Theme developers are expecting a post_type to be returned not a array !

    This is incorrect. It should never show that message on not elementor pages. How can i turn off that behavior. I dont want a array returned i need the post type returned !

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter BackuPs

    (@backups)

    in page or post get_query_var( ‘post_type’ ); returns a empty string ! It returns the post type name on any cpt ! Elementor is changing that behaviour and returns ‘e-landing-page’ on a single post or page. To me this is incorrect as those are NOT custom posts types !

    Please adjust this behaviour !

    “Hi,Since you are using our Pro features on your website, you’ll need to open a support ticket at my.elementor.com.

    www.remarpro.com rules state that commercial products are not supported here.”

    Thread Starter BackuPs

    (@backups)

    @saidaboukhadra

    This has nothing todo with the pro version. The error code happens when you use elementor and call

    $test= get_query_var( ‘post_type’ );
    if {$test==’your_post_type’} {}

    without the pro version activated.

    • This reply was modified 3 years, 11 months ago by BackuPs.
    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    without the pro version activated.

    @backups As you are an Elementor Pro user the developer can’t have a conversation with customers here. That’s not permitted for anyone.

    Do not seek Elementor support in the community forums.

    For pro or commercial product support please contact the developer directly on their site. This includes any pre-sales topics as well.

    https://my.elementor.com/

    As the developer is aware, commercial products are not supported in these forums. I am sure they will have no problem supporting you there.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Elementor changes get_query_var’ is closed to new replies.