- This topic has 13 replies, 4 voices, and was last updated 4 years, 8 months ago by Tom.
-
AuthorPosts
-
January 19, 2018 at 5:13 am #474786Radek
Hi Tom or somebody,
there is no back to top button on 3 of my sites instead setting is set to enable.
Can You look at it ?
http://www.pivnicejamajka.czThanx a lot
RadekJanuary 19, 2018 at 6:48 am #474895LeoStaffCustomer SupportHi there,
Can you try #1 here to eliminate plugin conflict first?
https://docs.generatepress.com/article/debugging-tips/Thanks!
January 21, 2018 at 3:50 am #476211RadekHi, looks like NextGEN Gallery plugin (Yes I use it on all 3 sites) is the culprit…
What can I do ?January 21, 2018 at 9:05 pm #476750TomLead DeveloperLead DeveloperI’m not sure how NextGen does it, but it somehow blocks the back to top button from being hooked into
wp_footer
, which is a core WP hook.Are you a big fan of NextGen? If not, we’ve experienced way less issues using something like Envira Gallery.
January 22, 2018 at 12:26 am #476819RadekYes, NextGen is one of the oldest and most used gallery plugin (Ofcourse, You know this π ), so I’d liku to stay with them. Are You contact their support, or what can I do for help You ?
Thanx Radek
January 22, 2018 at 11:48 am #477378TomLead DeveloperLead DeveloperIt seems that NextGen moves the scripts up above the back to top button HTML (for some reason).
You can force it to show up above the scripts (hopefully) using this PHP:
add_action( 'after_setup_theme', 'tu_move_back_to_top_button' ); function tu_move_back_to_top_button() { remove_action( 'wp_footer', 'generate_back_to_top' ); add_action( 'wp_footer', 'generate_back_to_top', 0 ); }
January 23, 2018 at 12:08 am #477720RadekIt does not help. My child theme functions.php:
<?php // Exit if accessed directly if ( !defined('ABSPATH')) exit; /* Add custom functions below */ load_theme_textdomain( 'generate', get_stylesheet_directory() . '/languages' ); /* back to top button conflict with NextGen gallery */ add_action( 'after_setup_theme', 'tu_move_back_to_top_button' ); function tu_move_back_to_top_button() { remove_action( 'wp_footer', 'generate_back_to_top' ); add_action( 'wp_footer', 'generate_back_to_top', 0 ); }
January 23, 2018 at 10:26 pm #478529TomLead DeveloperLead DeveloperCrazy, try this instead:
add_action( 'after_setup_theme', 'tu_move_back_to_top_button' ); function tu_move_back_to_top_button() { remove_action( 'wp_footer', 'generate_back_to_top' ); add_action( 'generate_before_footer', 'generate_back_to_top', 0 ); }
January 23, 2018 at 11:55 pm #478584RadekYes it works. But this is workaround, are You going to contact NextGen to solve this conflict ? Thanx for help and info π
January 24, 2018 at 8:55 am #478988TomLead DeveloperLead DeveloperI’ll try, but I assume they have a reason for moving the scripts around (although I can’t think of any good ones).
It may just be necessary to make this tweak if you want to use NextGen.
January 25, 2018 at 12:12 am #479377RadekOK, great support as always π
ThanxJanuary 25, 2018 at 12:28 pm #479913TomLead DeveloperLead DeveloperNo problem! π
August 24, 2019 at 4:20 am #992157jamesJust want to comment to TOM, you are awesome!
August 24, 2019 at 9:25 am #992405TomLead DeveloperLead DeveloperThank you! π
-
AuthorPosts
- You must be logged in to reply to this topic.