All posts by murdah

myStickymenu v2.0 is out!

I’m happy to announce that new myStickymenu v 2.0 is out!

myStickymenu v2.0.

Lot of things has changed since v1.9.1:

* Added: Settings grouped in tabs (General Settings, Style and Advanced).
* Added: If Make visible on Scroll is set to 0 automatic activation and deactivation scroll height will be used (useful for responsive designs).
* Added: option to disable on scroll down (show only on scroll up).
* Added: Class .up and .down on scroll up or down.
* Added: Reset to default settings.
* Fixed: If sticky menu class does not exist (null or undefined), it will show console log instead of error.
* Fixed: slide effect now slides on deactivate as well.
* Fixed: admin bar overlap for screens less than 600 px wide.
* Fixed: mobile blinking while screen resized by browsers top menu.

Tabbed settings

Settings are grouped into three tabs, General Settings, Style and Advanced.

Automatic activation

This new option will be activated if “Make visible on scroll” option is set to 0. 0 is used as default setting for all new installations.

With this option fade effect will behave as push, when sticky menu hit browser top it will start to push it down, and when deactivated, menu will fit to its original position. This will work good only when initial menu is same as sticky menu, otherwise transition will not be smooth.

Slide effect will work after, when menu is scrolled out of browsers top view so it can be used in both cases, when initial menu is same or different as sticky menu.

Disable on scroll down

This new option disables sticky menu on scroll down, its showed  only when scroll up. Used with automatic activation it behave as slide in on scroll up and fit into position

Up and Down classes

Menu can be styled different on scroll down or up. Class .up is added on scroll up,  and .down is added on scroll down. Use “CSS Style” field to style it as you wish (#mysticky-nav.wrapfixed.up or  #mysticky-nav.wrapfixed.down).

Reset to default settings

It will reset settings to defaults, write down your previous settings before using this option unless it’s a new install.

myStickySidebar – Sticky Sidebar for any WordPress Theme

Plugin glues your website’s sidebar, making it permanently visible while scrolling.
Sticky sidebar plugin will work out of box with some themes which use “#secondary” element id for sidebar such as: Twenty Seventeen, Twenty Sixteen, Twenty Fourteen, Twenty Twelve, Total, Flat Bootstrap, Bolid Theme and many more… Continue reading myStickySidebar – Sticky Sidebar for any WordPress Theme

PageSpeed Insights – Minify HTML function for WordPress

This is one little touch to speed up the things and make your WordPress a little bit faster.

To check if function is active inspect code with Firefox browser, if all of code is in one line you are all set, html is compressed and minimized… This is one of the steps to do to achieve maximum browsing experience… Other way to check if html is minimized is Google’s PageSpeed Insights

Disable CSS style in myStickymenu options

As some of you probably already noticed, there is a new option in latest version of myStickymenu plugin v1.8.1. I added this option because of site optimization, in case that you want all your CSS code inside of a single file, to achieve faster loading speeds.

To use this advanced option, some CSS is need to be added into your theme style.css file. Code you need will be generated in head element by the plugin. You should set up your desired style settings in plugin options first, since this is the code that will be generated. After you Enable “Disable CSS” option all style settings will be overridden by CSS, so you will not be able to change background color in plugin settings for example, you will need to do it in CSS style.

Simplest way to find and see CSS code that you will need is to use Firefox or Chrome, right click on the page with working myStickymenu on it and select “View page source”. So look in the header section of the code and search for myStickymenu style inside, it should look similar to this:
my-sticky-menu-style

Copy this CSS code (everything inside style) and put it to your style.css somewhere at the end of file. Customize it furthermore to suite your needs.

Now you can Enable “Disable CSS” option in plugin settings, and plugin should use CSS style from the style.css file instead generating it in the head…

How to Paginate WordPress Comments

In some cases when you have a lot of comments on a post, you want to split them into pages so user don’t need to scroll a lot. Lot of blogs or websites will never need this, but as I said in some cases this will be needed.

To set it up first go to Settings / Discussion and change comment option like bellow:

Enable check box – Enable threaded (nested) comments “5” levels deep.
Enable check box – Break comments into pages with “7” top level comments per page and the “last” page displayed by default.
Comments should be displayed with the “newer” comments at the top of each page.

So now everything works, your comments are paginated and click on older comments link will add “/comment-page-2#comments” to the end of your URL and get you to second page. All this is good but there is one slight problem with page Title Meta Tag, which will be the same for every comment page. This is no good at all since it will downgrade Google SEO and get you Duplicated Title Tags Warning.

To fix this navigate to your theme folder inside wp-content/themes/your-theme or even better your-theme-child and edit header.php file. Find this line: (it could be different on different themes)

<title><?php wp_title( '|', true, 'right' ); ?></title>

and change it to something like this:

<title>
<?php wp_title( '|', true, 'right' ); 
$page_comment = get_query_var('cpage');
if ($page_comment > 0) {echo ' | Page '.$page_comment;}?>
</title>

That should be it, your post comment pages will now should be SEO Friendly and shorter to scroll, therefore more user friendly.