Top plugin for wordpress. Back to top button for WordPress. Installation options. WPFront Scroll Top Plugin

Hello, dear readers! Ever wondered how to make a Back to Top button for WordPress? No? Very in vain. After all, this is not only a beautiful, but also a very useful thing. This button appears in the lower right corner when scrolling down the page. Click on it, and the page smoothly returns to its beginning. You can implement such a spectacular transition to the top in WordPress using the Dynamic To Top Options plugin. I’ll tell you about it today.

You can set the number of announcements displayed on the main page and in blog sections. On many blogs, even 5-7 announcements are enough to make a page quite long. And in order not to irritate readers once again and not force the mouse wheel, an excellent function was invented - a button, after clicking on which, the page automatically scrolls up to its beginning. Simple, effective and convenient!

Of course, someone might look at this askance and say that this is unnecessary and only adds extra code to the page. In many respects this is true, but do not forget about the usability of the site, the behavioral factor and banal convenience. This trifle can hook the reader and keep him as a subscriber. But everyone will decide for themselves whether to install it or not.

Dynamic To Top Options are standard. Download the latest version, unpack and upload to the server in the /wp-content/plugins directory. Activate and go to the settings, which, unlike most other plugins, are located in the “ Appearance" - "To Top".

All settings on English language, but they are not difficult to understand. Now I will help you with this.

The first section of the settings is called Behavior, which means properties.

Scroll time—sets the time it takes to scroll the page to the top. Measured in milliseconds.

Fade-in distance - the distance from the top edge of the page, starting from which the “up!” button appears.

Easing - sets the smoothness of scrolling. If you don't look closely, it's hard to tell the difference, especially if the scroll time is set to a low value.

Position — position of the button on the page. There are 4 positions to choose from:

  • top left - top left corner
  • top right - top right
  • bottom left - bottom left corner
  • bottom right - respectively bottom right

Prevent on mobile—whether or not to display the up button in browsers of mobile devices.

All that remains is to edit the appearance of the button in the Appearance section of the Dynamic To Top Options plugin settings. It is very convenient that all the changes made can be seen right there using an example.

Text version - allows you to write text on the button. After checking the box, the following fields will appear:

  • Button text - text, use simple and understandable words- “Up!” “To the top of the page”, “To the top!”, “To the top”, “Up!”, “Let’s fly!” and so on;
  • Font size - font size
  • Text color — test color. Press select for visual color selection;
  • Bold Text - bold style;
  • Text shadow - shadow from letters;
  • Text shadow color — shadow color.

Top/bottom padding - padding above and below from the text or image inside the button to its borders.

Greetings, friends! In this article I want to show you how you can make a “Top” button on a website. This button will be useful on sites with long articles or pages. When you click on the “Up” button, the page will return to the top, to the main menu (site header).

Usually, to install such a button, everyone wants to download the plugin as quickly as possible and doesn’t bother too much, but I don’t think there is a need to clutter the site with a bunch of unnecessary plugins, when everything can be done very easily and simply without using plugins.

The laziest can create such a button using many plugins, for example Scroll to Top or WP Scroll To Top 😉

You can remember how to find and install the plugin in one of the .

Creating a "Back to Top" Button Without Plugins

Installing the button is very easy, in just a few simple steps.

1. Open the function.php file.

There are two ways to open function.php:

  • To open with text editor in your theme's root folder
  • Go to Appearance -> Editor and select Theme Functions (functions.php) for editing

2. Copy and paste the code below at the very bottom, before the closing ?> tag.

Gif" />"; ) add_action("wp_head", "back_to_top_style"); function back_to_top_style() ( echo " #totop ( cursor:pointer; position: fixed; right: 30px; bottom: 30px; display: none; outline: none; ) "; ) add_action("wp_footer", "back_to_top_script"); function back_to_top_script() ( echo " jQuery(document).ready(function($)( $(window).scroll(function () ( if ($(this).scrollTop() > 400) $("#totop") .fadeIn(); else $("#totop").fadeOut(); )); $("#totop").click(function () ( $("body,html").animate(( scrollTop: 0 ), 800); return false; )); )); "; )

3. Save your changes and admire the Up button you created.

And now, anticipating your questions, I will try to answer them in advance!

And so, in in this example we put an image on the button. In order to remove the image and add text, replace line 3 in the code of our example with:

Echo "Up";

In order to replace the button image, replace the link with the image you need in line 3.

The button will be displayed when we go more than 400 pixels down from the site header on the page, and will be hidden if we go higher. Changing the height at which the button will appear is quite easy; to do this, you need to replace the value 400 with the height you need in this line of code:

If ($(this).scrollTop() > 400)

If something didn’t work out for you, feel free to write in the comments! And if it works, share your impressions :)

Greetings, friends! In this article I want to show you how you can make a "Top" button on a website. This button will be useful on sites with long articles or pages. When you click on the "Up" button, the page will return to the top, to the main menu (site header). Usually, to install such a button, everyone wants to download the plugin as quickly as possible and doesn’t bother too much, but I don’t think there is a need to clutter the site with a bunch of unnecessary plugins, when everything can be done very easily and simply without using plugins. The laziest can create such a button using many plugins, for example Scroll to Top or WP Scroll To Top ;) Remember...

Hello, dear readers of the site! I present to you and your attention new post, in which I will talk about what the “Back to Top” button is for and how to install it on WordPress. Well, in the beginning, as always, I’ll explain why this button is even needed and whether it’s worth installing. Let's get started!

What is the Back to Top button for?

For example, you wrote a long article, the user read it to the end and now wants to go back to the beginning. I think this is a familiar situation. Is not it? But turning the mouse wheel and “pulling” the slider is not very convenient and takes a long time.

That's why it was created this function— raising the page to the top. And also, if you design the button beautifully, then this is a plus for the design! And if you modify it, then when you press it, you can release the page down, i.e. vice versa. Just like that.

Raising the page can be done both with the help of a plugin and without it. I'll explain both now. So be careful.

Installing a button with a plugin

The first thing you need to do is activate it. After which the button will start working. But the button image will be standard. I advise you to change it to your own. For this:

  • Go to the “Options” tab
  • —> Scroll to Top
  • And choose the appearance of the button from those proposed or upload your own
  • Click the "Update Options" button
  • Ready! The back to top button for WordPress has a new look.
  • Like this. You can also configure it, namely:

    • Location
    • Indentations
    • Speed
    • and other
    "Back to top" button without a plugin

    Now we will look at how to do back to top button for wordpress without using third-party plugins. Why no plugin? But because plugins slow down the site. I have already said this more than once (In the article - Adding video to WordPress) and I will say it again and again.

    To make a button follow the instructions below:

    1. Open the file footer.php, which is located in the folder with the template, and paste the code in front:

    Just make some changes, namely:

    • where it says your_site.ru - write the address of your site
    • where is the path to the picture - enter the path to the picture that will be the button
    • where picture is the title of the picture. If not .jpg, then change it to the format that is set in the picture.

    2. Open the style.css file, which is also located in the template folder, and at the very end paste the following code:

    #toTop ( width: 100px; text-align: center; padding: 5px; position: fixed; bottom: 10px; right: 10px; cursor: pointer; color: #666666; text-decoration: none;)

    3. Download and extract it. It contains the verx.js file, which you need to add to the root of your site.

    4. Open the functions.php file located in the template folder and enter the code there:

    // smart jquery inclusion if (!is_admin()) ( wp_deregister_script("jquery"); wp_register_script("jquery", ("//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" ), false); wp_enqueue_script("jquery"); )

    5. Well, that's all! I can congratulate you, now your site has a back to top button for WordPress.

    You have just read the article “Back to Top Button for WordPress” and installed it for yourself. How was it? Write in the comments! That's all for now, everyone.

    Best regards, Konstantin Belan.

    The “Up” button can now be seen on many sites. This is mainly due to the increase in the number of mobile Internet users, for whom such a button provides noticeable ease of navigation. You can see how it works on this website - when you start scrolling the page down, a scroll arrow to the top appears at the bottom right.

    Adding it to your WordPress site is quite simple without a plugin using a special javascript function. To do this you need to complete 4 steps.

    1. Place the goTop.js file with the following content in the js directory of your theme. If there is no such directory, you can create it, or use any other directory, but then you need to change the path to the goTop.js script in the second step.

    $(function())($.fn.scrollToTop=function())($(this).hide().removeAttr("href");if($(window).scrollTop()!="0")($ (this).fadeIn("slow"))var scrollDiv=$(this);$(window).scroll(function())(if($(window).scrollTop()=="0")($(scrollDiv ).fadeOut("slow"))else($(scrollDiv).fadeIn("slow"))));$(this).click(function())($("html, body").animate((scrollTop :0),"slow"))))));

    $ (function () ( $ . fn . scrollToTop = function () ( $ (this ) . hide () . removeAttr ( "href" ) ; if ( $ (window ) . scrollTop () != "0" ) ( $ (this) . fadeIn ("slow" ) ) var scrollDiv = $ (this ) ; $ (window ) . scroll (function () ( if ($ (window ) . scrollTop () == "0" ) ( $ (scrollDiv ) . fadeOut ( "slow" ) ) else ( $ (scrollDiv ) . fadeIn ( "slow" ) ) ) ; $ ( this ) . click ( function () ( $ ( "html, body" ) . animate ( ( scrollTop : 0 ) , "slow" ) ) ) ) ) ) ;

    2. Place the following code in your theme's footer.php file before the closing tag

    /js/goTop.js" type="text/javascript"> $(function() ( $("#goTop").scrollToTop(); ));

    < a href = "#" id = "goTop" alt = "Top" title = "Top" > < img src = " /images/goUp.png" border = "0" align = "absmiddle" / > < / a >

    Share with friends or save for yourself:

    Loading...