Site logo

Archived topic

Mobile version showing on desktop & problems with footer not showing

5 replies · Started by harry on June 3, 2022

Viewing posts 1–6 of 6

Hey guys,

I have recently made some changes to my child theme in my staging site to remove woocommerce functions:

// END ENQUEUE PARENT ACTION
// enable gutenberg for woocommerce
function activate_gutenberg_product( $can_edit, $post_type ) {
 if ( $post_type == 'product' ) {
        $can_edit = true;
    }
    return $can_edit;
}
add_filter( 'use_block_editor_for_post_type', 'activate_gutenberg_product', 10, 2 );

// enable taxonomy fields for woocommerce with gutenberg on
function enable_taxonomy_rest( $args ) {
    $args['show_in_rest'] = true;
    return $args;
}
add_filter( 'woocommerce_taxonomy_args_product_cat', 'enable_taxonomy_rest' );
add_filter( 'woocommerce_taxonomy_args_product_tag', 'enable_taxonomy_rest' );
add_filter( 'woocommerce_product_description_heading', '__return_null' );
function mb_remove_sidebar() {
    return false;
}

add_filter( 'is_active_sidebar', 'mb_remove_sidebar', 10, 2 );
add_filter( 'woocommerce_is_purchasable', '__return_false');
// remove title
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
// remove price
remove_action('woocommerce_before_main_content', 'woocommerce_price_format');
// remove  rating  stars
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );
// remove product meta 
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
// remove description tabs
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
// relocate description
function woocommerce_template_product_description() {
  woocommerce_get_template( 'single-product/tabs/description.php' );
}
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_product_description', 20 );
// remove sale tag
remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_sale_flash', 10 );
// remove price
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 10);
// remove breadcrumb
remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0);
// remove sale tag
remove_action('woocommerce_before_main_content', 'woocommerce_notices_wrapper', 20, 0);
// remove images
remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
// remove related products
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
// remove additional information tabs
remove_action('woocommerce_after_single_product_summary ','woocommerce_output_product_data_tabs',10);

This looks fine on my staging site and produces the columns exactly how they should. But for some reason when I merged the changes to the live site, I am getting a mobile display showing on desktop on posts specifically.

It should look like this: https://gyazo.com/92fd740b9ce3e15c7b8303a2f013a354

Additionally when I am logged into the site, I get this massive Wordpress header bar (where the old login info used to be): https://gyazo.com/6a64e95eb2b7d469116d9ddbebb84d5c

I am also trying to get my footer back, but even though everything is in the correct widget areas, the footer does not show for some reason. How can you help? I've tried clearing cache and re-merging site etc. Checking plugin conflicts and I can't find anything. I'm completely stuck and I'd really appreciate some help.

Cheers,
Harry

Hi Harry,

This really doesn't sound like a GP related issue to me so I'm not sure how much help we are able to offer:
https://generatepress.com/what-support-includes/

Have you tried removing all the custom functions above and testing if that solves the issue?

Hey Leo,

Thanks for the prompt response I appreciate it and understand.

I did remove all the custom functions and it still shows the mobile version on the desktop weirdly, so I don't think it's linked to the woocommerce functions, it's just the only thing I have changed recently so I thought it would be worth bringing up.

As for the footer, would that not be linked to the Generatepress theme? The widgets are in the right place, but the footer just doesn't want to show for some strange reason.

What do you think could be the issue with this?

Cheers,
Harry

Can you disable all plugins except GP Premium for us to take a look?

Hey Leo,

I disabled everything quickly, but don't want to disable everything on the live site.

Can I give you credentials to the staging site and disable everything so you could look there? Disabling everything is not bringing the footer back in.

Cheers,
Harry

Hi Harry,

I tried to login, but the credential doesn't work.
Can you check?

This archived topic is closed to new replies.