fbpx

AJAX loading issue.

HomeTopicsSupport forumAJAX loading issue.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #14305
    Avatar
    techtone
    Participant

    There is a strange behaviour with AJAX loading the products in the Shop.

    I recorded my screen to explain it better and link can be found in private content.

    Thanks

    #14306
    Artem Temos
    Artem Temos
    Keymaster

    Hello,

    Try to add the following code snippet to the functions.php file in your child theme. This bug will be fixed in our next theme update

    function xts_get_document_title() {
    	$title = wp_get_document_title();
    	$post_meta = get_post_meta( xts_get_page_id(), '_yoast_wpseo_title', true );
    	if ( property_exists( get_queried_object(), 'term_id' ) && function_exists( 'YoastSEO' ) ) {
    		$taxonomy_helper = YoastSEO()->helpers->taxonomy;
    		$meta            = $taxonomy_helper->get_term_meta( get_queried_object() );
    		if ( isset( $meta['wpseo_title'] ) && $meta['wpseo_title'] ) {
    			$title = wpseo_replace_vars( $meta['wpseo_title'], get_queried_object() );
    		}
    	} elseif ( $post_meta && function_exists( 'wpseo_replace_vars' ) ) {
    		$title = wpseo_replace_vars( $post_meta, get_post( xts_get_page_id() ) );
    	}
    	return $title;
    }

    Kind Regards

    #14307
    Avatar
    techtone
    Participant

    I’m using Code Snippets plugin to avoid using a child theme and this is the error I’m getting:

    The snippet has been deactivated due to an error on line 33:
    Cannot redeclare function xts_get_document_title.

    Thanks

    #14308
    Artem Temos
    Artem Temos
    Keymaster

    It would be better to use a child theme since it is the only way to override theme files and functions. Otherwise, you can replace this function completely in the parent theme in the file framework/includes/helpers.php.

    #14311
    Avatar
    techtone
    Participant

    Went ahead with a child theme and it fixed the issue. Waiting for the next update. Thanks!

    #14317
    Artem Temos
    Artem Temos
    Keymaster

    Great, you are welcome!

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘AJAX loading issue.’ is closed to new replies.

Sign in

No account yet?

Create an Account