Home Forums WoodMart support forum Problems with the Child Theme and Site Indexing

Problems with the Child Theme and Site Indexing

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #581169

    cionirodolfo
    Participant

    Hello forum,

    I have a problem that I can’t solve. The issue lies with the child theme. When I activate it, the site becomes non-indexable by search engines.

    When I run a scan with Screaming Frog, the site returns a 403 error (see attachment). However, using the parent theme, the problem disappears.

    I have tried running the child theme with only the necessary plugins, but the issue remains. Additionally, I see this error in a loop: woodmart/woocommerce/loop/add-to-cart.php on line 41.

    Can someone help me?
    Thank you very much to everyone who reads this and tries to assist me.

    Thanks,
    Foffo75

    Attachments:
    You must be logged in to view attached files.
    #581239

    Hello,

    Maybe the problem is likely caused by custom code added to the child theme. Please review any custom code you have added to the child theme to identify and resolve the issue.

    Best Regards.

    #581324

    cionirodolfo
    Participant

    Good evening,

    I have activated the child theme. I tried emptying the child theme, but the result did not change. Could someone check if I’m missing something?

    <?php
    /**
    * Enqueue script and styles for child theme
    */
    function woodmart_child_enqueue_styles() {
    wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri() . ‘/style.css’, array( ‘woodmart-style’ ), woodmart_get_theme_info( ‘Version’ ) );
    }
    add_action( ‘wp_enqueue_scripts’, ‘woodmart_child_enqueue_styles’, 10010 );

    /**
    * Only show products in the same sub categories in the related products area
    *
    * @param $terms – Terms currently being passed through
    * @param $product_id – Product ID of related products request
    * @return $terms/$subcategories – Terms to be included in related products query
    */
    function blz_filter_related_products_subcats_only($terms, $product_id) {
    // Check to see if this product has only one category ticked
    $prodterms = get_the_terms($product_id, ‘product_cat’);
    if (count($prodterms) === 1) {
    return $terms;
    }

    // Loop through the product categories and remove parent categories
    $subcategories = array();
    foreach ($prodterms as $k => $prodterm) {
    if ($prodterm->parent === 0) {
    unset($prodterms[$k]);
    } else {
    $subcategories[] = $prodterm->term_id;
    }
    }
    return $subcategories;
    }
    add_filter( ‘woocommerce_get_related_product_cat_terms’, ‘blz_filter_related_products_subcats_only’, 20, 2 );

    //Aggiunte per aumentare la velocità di caricamento
    //For Google Fonts:
    add_filter( ‘elementor/frontend/print_google_fonts’, ‘__return_false’ );

    //For Font Awesome:

    add_action(‘elementor/frontend/after_register_styles’,function() {
    foreach( [ ‘solid’, ‘regular’, ‘brands’ ] as $style ) {
    wp_deregister_style( ‘elementor-icons-fa-‘ . $style );
    }
    }, 20 );

    //For Eicons:

    add_action( ‘wp_enqueue_scripts’, ‘disable_eicons’, 11 );
    function disable_eicons() {
    wp_dequeue_style( ‘elementor-icons’ );
    wp_deregister_style( ‘elementor-icons’ );
    }

    //For redirect CF7:

    add_action( ‘wp_footer’, ‘wpm_redirect_cf7’ );
    function wpm_redirect_cf7() { ?>
    <script type=”text/javascript”>
    document.addEventListener(‘wpcf7mailsent’, function(event) {
    location = ‘https://www.manichinimoda.com/thxcf7&#8217;;
    }, true);
    </script>

    <?php }

    /**
    * Add Continue Shopping Button on Cart Page
    * Add to theme functions.php file or Code Snippets plugin
    */

    add_action( ‘woocommerce_before_cart_table’, ‘woo_add_continue_shopping_button_to_cart’ );

    function woo_add_continue_shopping_button_to_cart() {
    $shop_page_url = get_permalink( woocommerce_get_page_id( ‘shop’ ) );

    echo ‘<div class=”woocommerce-message”>’;
    echo ‘ Contnua con gli acquisti cliccando sopra questa scritta‘;
    echo ‘</div>’;
    }

    #581419

    Hello,

    Please once delete the Child Theme on your Site > and then recreate it and then check back the issue again. Hopefully, you won’t have any issues by then.

    The following article describes how to install a child theme manually:
    https://xtemos.com/docs-topic/setup-child-theme/

    Best Regards.

    #583784

    Mike
    Participant

    Hello,
    last days I see this error in a loop: woodmart/woocommerce/loop/add-to-cart.php on line 41. No plugin has been plugin here for months. No plugin has been new plugin here for months.

    #583831

    Artem Temos
    Keymaster

    Hello,

    Please disable any plugins not directly related to our theme and provide us with your admin access details. We will log in to your dashboard and investigate the issue. Please ensure that you only keep the following plugins that are necessary for our theme to work correctly:
    – WoodMart core
    – WooCommerce
    – Elementor/WPBakery Page Builder

    Thank you in advance.

    #583915

    cionirodolfo
    Participant

    Good morning,
    I confirm that only the following plug-ins are active:

    – WoodMart core
    – WooCommerce
    – Elementor/WPBakery Page Builder

    Best regard
    Foffo75

    #583916

    cionirodolfo
    Participant
    #583936

    Artem Temos
    Keymaster

    As we can see, your website is working correctly while the child theme is activated. Could you please check it now from your end?

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