Archive for the ‘WordPress hints, advices’ Category

WordPress 4.5, jQuery 1.12 and compatibility issues

Thursday, April 14th, 2016

JavaScript Error

JavaScript Error

One of updates included into WordPress 4.5 is jQuery 1.12.3 replaced jQuery 1.11.3. Cool!
But there is a known issue with older JavaScript code. If your plugin or theme contains code snippet like one below, you will get error message:
“Uncaught Error: Syntax error, unrecognized expression: a[href=#scroll-top]”

Read the rest of this entry

Override WordPress option value

Tuesday, September 2nd, 2014

Override WordPress option

Override WordPress option

Override WordPress option value temporally or conditionally? Did you ever have such desire? Is it possible? Yes!

Thanks to the WordPress core developers team it is not only possible but even simple. The only special thing you need to know is the WordPress option name.
In order to change some WordPress option value for the user, user role, date, time, post, etc. use proposed code snippet as the starting point. The code sample below automatically replaces global WordPress administrator email admin_email option value with own email of the current user with “Administrator” role. Just insert this code to your active theme functions.php file in order it starts working:

Read the rest of this entry

WordPress 3.7 welcome

Saturday, October 26th, 2013

WordPress 3.7

WordPress 3.7

WordPress version 3.7 “Basie” is available for download. WordPress developers fulfills their promises. That’s good.
New features of this major release are:
Background updates. Automatic installation for security and bug fix minor updates are enabled by default. As official blog says, you may sleep, but critical update will be applied without your participation.
Stronger password recommendations checked during new password creation and followed WordPress password strongness meter. It recognizes common mistakes that can weaken your password: dates, names, keyboard patterns (123456789), and even pop culture references;
Improved search results. Search results are ordered better in relevance to the post content, not by publication date only.;
Better global support. As the part of realized automatic update engine WordPress 3.7 adds support for automatically installing the right language files and keeping them up to date.

Read the rest of this entry

Hide some posts from the editors

Saturday, July 27th, 2013

Hide posts from editors

Hide posts from editors

WordPress user with the “Editor” role assigned is capable to edit any post and page. But what to do in such cases as this one?
– “For example I have a client with ‘editor’ capabilities, but I don’t want him to be able to edit the homepage and one or two other pages on the website. Mainly because they contain a lot of styling which is easily disrupted in the wrong hands.”
How to prevent your clients from ruin their site due to lack of expertise at WordPress and HTML/CSS coding?
That’s not so difficult. Get those pages and posts IDs. Copy and paste code snippet below

Read the rest of this entry

WooCommerce multiple vendors setup

Sunday, June 16th, 2013

WooCommerse with multiple vendors

WooCommerse with multiple vendors

WooCommerce multiple vendors decision – is it possible to setup this popular WordPress plugin for eCommerce that way?
WooCommerce is designed for the only shop owner by default. Yes, you may assign the ‘Shop Manager’ role more than to one user simultaneously, but all of them will have the same permissions. All of them will be the boss at your e-shop. What to do if you wish that your e-shop has multiple sellers with limited rights for editing their own selling items only? That is a seller or vendor (e.g. software developer) may input and publish at your e-shop his own items (software applications) only? Is it possible without additional programming? Read further and I show you one of the possible decisions.

Read the rest of this entry

Optimize WordPress database perfomance

Monday, November 5th, 2012

Optimize WordPress database perfomance

Optimize WordPress database

Optimize WordPress database perfomance – every blog owner got this conclusion, ealier or later, but finally always.
Any site owner asks himself, how can I make my site lighter and faster. What else should I do? What technique to apply? General site speed is critical property for present days. As there are a lot of alternative variants where web-surfer may find and get the same information, large part of visitors do not wait, while their browsers finish download process of slow page. They just return to search engine and click on the next link from the huge list of available sources. This way, we (site owners) lose auditory and, as a result, have a lower traffic. And WordPress blogs are not exclusion. The same general rools are in action for our loving WordPress too. It doesn’t matter, what platform do you use, in order to build your site. It does matter, with what speed your platform delivers content to your site’s visitors.
Reliable hosting service provider; fast and powerful server; wide, high-speed, broadband, backbone channel; popular and effective publishing platform – all of these factors are important and valuable in relation to the final result – your site speed.

Read the rest of this entry