joesexton00
Forum Replies Created
-
Forum: Plugins
In reply to: [Scroll Back To Top] Make plugin validate for accessibilityYes it is possible currently, though it will require adding some code to your theme’s functions.php file. There is a filter for the button markup that allows you to alter the markup however you need to. For example, to change the
<i>
to a<em>
add the following to your theme’s functions.php file.add_filter( 'sbtt_button_markup', 'my_sbtt_filter' ); function my_sbtt_filter($button_markup) { $button_markup = str_replace('<i ', '<em ', $button_markup); $button_markup = str_replace('</i>', '</em>', $button_markup); return $button_markup; }
Forum: Plugins
In reply to: [Scroll Back To Top] is it possible to include control tip text with buttonYes, this is possible, though it will require adding some code to your functions.php file. You’ll need to add your own markup to do this, but you can use the sbtt_button_markup filter to add this.
add_filter( ‘sbtt_button_markup’, ‘my_sbtt_filter’ );
function my_sbtt_filter($button_markup) {// Add your tooltip to the current button markup here.
return $button_markup;
}
Forum: Plugins
In reply to: [Scroll Back To Top] Add to only certain pagesYes it is possible, though it will require adding some code to your theme’s functions.php file. See this thread for an example of that: https://www.ads-software.com/support/topic/create-an-exception.
Forum: Plugins
In reply to: [Scroll Back To Top] Conflicting with Font Awesome?It is possible for the font awesome font package to cause conflicts with the plugin due to two instances of font awesome being loaded on the page. There are a few solutions at my support page in the troubleshooting section: https://www.webtipblog.com/scroll-back-top-wordpress-plugin/.
The first solution is to set the plugin to use “Custom Text” instead of an icon as the label. This may not be the most ideal solution, but if no icons are used then the plugin will not try to include the font-awesome library and will not cause a conflict.
A second solution is a little more code intensive. The plugin offers a filter for the HTML output of the button. The idea is to set the plugin to use “Custom Text” but then set the “Custom Label Text” text box to contain no text at all. This will not load the plugin’s version of font-awesome and will render an empty button. The next step is to apply the filter in your theme’s functions.php file to add the font-awesome icon manually. Here is an example of a code snippet you could include in functions.php to insert an icon into the button’s “Custom Label” area. This will use your theme’s version of font-awesome and cause no conflicts.
add_filter('sbtt_button_markup', 'my_scroll_back_to_top_filter'); function my_scroll_back_to_top_filter($text) { $text = str_replace( '<span class="scroll-back-to-top-inner">', '<span class="scroll-back-to-top-inner"><i class="fa fa-arrow-circle-up"></i>', $text ); return $text; }
The ‘<i class=”fa fa-arrow-circle-up”></i>’ is the icon for font-awesome. To see more options, including the icons I included in the plugin, go to https://fortawesome.github.io/Font-Awesome/icons/. I should also note that this is the recommended method to add your own icons from any icon library if needed to match a theme.
I hope this helps!
Forum: Plugins
In reply to: [Scroll Back To Top] Mobile Hiding ProblemThis sounds like a CSS conflict with something. Can you post the link to your site to take a look?
Forum: Plugins
In reply to: [Scroll Back To Top] feature request: export settingsThanks for the feedback, the import/export feature would be very handy, especially for those who frequently use the same/similar settings for many sites. I’ll work on incorporating that into the next release.
Forum: Plugins
In reply to: [Scroll Back To Top] Create an exception?Yeah, you could hook into the sbtt_button_markup filter and return an empty string if on the home page. In your theme’s functions.php add the following:
add_filter( ‘sbtt_button_markup’, ‘my_sbtt_filter’ );
function my_sbtt_filter($button_markup) {
if (is_front_page()) {
return “”;
} else {
return $button_markup;
}
}Alternatively, you could add the following to the advanced css text field in the admin settings panel. Substitute {home page container parent identifier} with a css selector of a parent element on the home page. Usually WordPress themes add a post/page class to the body element, that would be a good selector to use.
{home page container parent identifier} .scroll-back-to-top-wrapper.show {
display:none!important;
}Forum: Plugins
In reply to: [Scroll Back To Top] wp_dequeue_script?On second thought, there is a filter available, “sbtt_button_markup” which is the filter for the HTML markup of the button, you could add a filter and return “” to essentially remove the button. Doing that will not remove the styles or javascript, but the button won’t show.
Forum: Plugins
In reply to: [Scroll Back To Top] Doesn't scroll to the top edgeIn looking at https://www.lovesweetmess.com/ I see that the top of the <body> element evaluates to below the nav menu and hero image, which is why the plugin is not scrolling to the top of the page. Without modifying the theme the solution is to hack the plugin to change the selector used in the javascript file to go to the top of the nav menu header or to the <html> element. That can be found in /scroll-back-to-top/assets/js/scroll-back-to-top.js line 9.
To address this I will add a filter for this selector so it can be modified by the theme if the <body> selector is not working correctly. Look for this filter in the next release.
Forum: Plugins
In reply to: [Scroll Back To Top] wp_dequeue_script?I haven’t implemented a way to selectively enable/disable the button per page, but in the next release I can add a filter for the enabled/disabled status to allow the theme to disable when needed.
One way to pull this off would be to simply add a CSS property “display: none !important” for the .scroll-back-to-top-wrapper.show selector. While not ideal, this would work without hacking the plugin.
Forum: Plugins
In reply to: [Scroll Back To Top] Doesn't scroll to the top edgeI’m not sure what the exact cause of this is, but I am guessing it is a conflict with the theme styling that is causing an issue. The plugin scrolls to the top of the body element, but it is possible that the theme has some margin or padding on the body or html elements of the page, which could prevent scrolling to the top of the page visually. I’d be happy to take a look at the site to see if I can debug the issue, if a solution can be found I’d like to implement it to help others as well.
Forum: Plugins
In reply to: [Scroll Back To Top] transparent background and customised arrow?There is not an option to do so, but using the “Advanced Options – Extra CSS” text box it is possible to add any CSS styles you would like. To achieve what you’re looking for enter this into the Extra CSS text box:
.scroll-back-to-top-wrapper { background:none !important; }
Hope that helps, thanks!
Forum: Plugins
In reply to: [Scroll Back To Top] Add offset size to admin settings panelThis is great feedback, I’ll look into incorporating this into a coming release.
Thanks!
Forum: Plugins
In reply to: [Scroll Back To Top] Update Breaks my Site – Solution @ bottomThanks for posting your specs. I was able to locate the error and released an update to address it. V1.1.3 should solve this issue and I verified on all versions of PHP that I could get my hands on. Thank you for your patience, sorry again for the issue.
Forum: Plugins
In reply to: [Scroll Back To Top] Update Breaks my Site – Solution @ bottomI’m sorry you’re having issues with the crashing. Can I ask what version caused the crash? I just released a fix last evening that fixed a crash that occurred in PHP versions below 5.3. The latest updates should also fix the settings that get reset upon activation so they persist between plugin updates, deletions, and are basically only deleted if you click the restore default settings button. I do apologize for the trouble, it is certainly not my intention to cause problems by releasing updates and I strive to fix any issues asap.
I should also note that simply deleting the scroll-back-to-top plugin folder will fix that error that cropped up in 1.1 without needing to remove/restore all plugins on your site. The settings are persisted to the database so downloading the latest version to replace the missing folder will fix the issue.