[Resolved] Few issues since GP update – mobile menu, language switchers, page too long

Home Forums Support [Resolved] Few issues since GP update – mobile menu, language switchers, page too long

Home Forums Support Few issues since GP update – mobile menu, language switchers, page too long

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #592695
    Marie Odile

    Hi,

    I am using the following combination of plugins :
    – Elementor Pro
    – WPML
    – GP Premium
    Somehow since last update I have 3 main issues on this website : http://www.bougieetsenteur.com
    1) Mobile Menu is at the bottom of the page
    2) WPML Language Switcher disappeard : I can still see it on a staging server but not on the production site. IT should be on the top right corner as you can see it here :
    https://www.staging1.bougieetsenteur.com/
    login:bougieet_staging
    password: siteground!test01
    but on the production environement the switchers are not there http://www.bougieetsenteur.com
    3) Site too long : Somehow you can scroll down way further than the content of the site while before this wasn’t happening.

    Can you please help ?
    Thanks in advance,
    Jesus

    #592732
    Leo
    Staff
    Customer Support

    Hi there,

    Can you first confirm that you are using the latest GP premium plugin 1.6.2?

    Let me know πŸ™‚

    #592752
    Marie Odile

    Hi,
    I am using :
    Theme : GeneratePress Version 2.1.2 with a child Theme
    Plugin : GP Premium Version 1.6.2
    Thank you!

    #592795
    Leo
    Staff
    Customer Support

    Hmm can you first try #1 here to eliminate any plugin conflicts?
    https://docs.generatepress.com/article/debugging-tips/

    Also switch to the parents theme to make sure that nothing in the child theme is causing the issues.

    Let me know πŸ™‚

    #592911
    Marie Odile

    IF I switch to the default theme everything is working fine but I have not change anything in the child theme.
    The content of the child theme is the following :
    functions.php :
    ….
    /*ajouter WPML widget*/
    add_action( ‘generate_inside_navigation’,’tu_insert_into_navigation’ );
    function tu_insert_into_navigation()
    { ?>

    <?php do_action( ‘wpml_add_language_selector’ ); ?>

    <?php }
    ….
    I have created the following folder

    Folder named : wpml/templates/language-switchers/custom-language-swictcher
    with 2 files on it :
    config.json :
    {
    “name” : “shortcode language switcher”,
    “version”: “1.0.0”,
    “settings”: {
    “display_flags”: 0,
    “display_names_in_native_lang”: 0,
    “display_names_in_current_lang”: 0
    }
    }
    and another file template.twig:
    {{ code|upper }}

    I haven’t change anything except updating GeneratePress and WPML.
    Can you please help ? IF you need access to a ftp please let me know but I will need to make this post private.
    Thank you!

    #592912
    Marie Odile

    The rest of my functions.php file is :

    <?php
    /**
     * Generate child theme functions and definitions
     *
     * @package Generate
     */
     /*
     //starting here customization
    add_filter( 'style_loader_src', 'generate_remove_cssjs_ver', 10, 2 );
    add_filter( 'script_loader_src', 'generate_remove_cssjs_ver', 10, 2 );
    function generate_remove_cssjs_ver( $src ) {
    	if( strpos( $src, '?ver=' ) )
    		$src = remove_query_arg( 'ver', $src );
    	
    	return $src;
    }
    */
    
    add_action( 'init', 'generate_disable_wp_emojicons' );
    function generate_disable_wp_emojicons() 
    {
    	// all actions related to emojis
    	remove_action( 'admin_print_styles', 'print_emoji_styles' );
    	remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
    	remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
    	remove_action( 'wp_print_styles', 'print_emoji_styles' );
    	remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
    	remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
    	remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
    }
    /*add_filter( 'generate_fontawesome_essentials', 'generate_fontawesome_essentials' );
    function generate_fontawesome_essentials()
    {
        return true;
    }
    */
    //finishing here customization
    
    /*ajouter WPML widget*/
    add_action( 'generate_inside_navigation','tu_insert_into_navigation' );
    function  tu_insert_into_navigation()
    { ?>
        <div class="wpml-picker">
            <?php do_action( 'wpml_add_language_selector' ); ?>
        </div>
    <?php }
    
    function logout_redirect_home(){
    	wp_safe_redirect(home_url());
    	exit;
    }
    add_action('wp_logout', 'logout_redirect_home');
    
    //avoid having to confirm
    add_action('check_admin_referer', 'logout_without_confirm', 10, 2);
    function logout_without_confirm($action, $result)
    {
        /**
         * Allow logout without confirmation
         */
        if ($action == "log-out" && !isset($_GET['_wpnonce'])) {
            $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
            $location = str_replace('&', '&', wp_logout_url($redirect_to));;
            header("Location: $location");
            die;
        }
    }
    #592971
    Leo
    Staff
    Customer Support

    Can you try a blank child theme here?
    https://docs.generatepress.com/article/using-child-theme/#installing-a-child-theme

    If not still doesn’t work then disable each function in your child theme and see which one is causing the issue.

    #593032
    Marie Odile

    it’s weird.
    I have delete my child theme after doing a backup in local and upload the new child theme.
    No changes.
    Seems it might be related to cache but I have try with chrome development tools selecting clear cache and also I have installed a chrome extension for it.
    In addition I have deleted all plugins that caches, I have stop any cloudflare or siteground cache tool.
    After all of this I still have issues with language swticher not appearing, page too long and mobile menu at the end of the website.

    Any idea ? I really need to sort it out because until I don’t fix this issue I can’t do any changes on my website because I don’t know if it’s cache or is incompatibility between GeneratePRess+Elementor+WPML
    Thanks!

    #593081
    Marie Odile

    Hi,
    It looks like removing all custom CSS in GeneratePress is working as with the default theme.
    Somehow with the updates this code

    .main-navigation:not(.navigation-stick) {
        position: relative;
        z-index: 99;
    }

    is the one making the page too long and also the mobile menu not working. This code was recomended by you a year ago in order to have the Logo stays over the navigation menu. You can check behaviour on the production environement : bougieetsenteur.com
    Can you please help ?
    Thank you!

    #593244
    Tom
    Lead Developer
    Lead Developer

    Try this instead:

    #site-navigation {
        position: relative;
        z-index: 99;
    }
    #593399
    Marie Odile

    Thanks Tom!
    Just one more issue : Full logo is not clickable only the bottom part of it.

    Finally I was reviewing the code of my functions.php and I don’t know what is this code for :

    add_action( ‘init’, ‘generate_disable_wp_emojicons’ );
    function generate_disable_wp_emojicons()
    {
    // all actions related to emojis
    remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ );
    remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 );
    remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ );
    remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ );
    remove_filter( ‘wp_mail’, ‘wp_staticize_emoji_for_email’ );
    remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ );
    remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ );
    }

    Any idea ? Should I keep it ?
    Thank you!

    #593519
    Tom
    Lead Developer
    Lead Developer

    Try adding this as well:

    .main-navigation .navigation-logo img {
        z-index: 9999;
    }

    That code removes emojis from your site, which are added by WordPress.

    #593751
    Marie Odile

    Thanks a lot!!!

    #594124
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.