HTML5 introduced some interesting form element changes. Inputs can now have an input type of “number”.
Unfortunately there are now a couple of caveats to using the number input, depending on your use case. Firefox and Webkit browsers will show an Up and Down arrow for the user to increment the number. These can get in the way of styling or cause user error. The other issue is that this increment can be adjusted with the Mouse Wheel and the Up and Down keys.
The below code will allow you to remove the increment arrows and maintain the other benefits of a number input.
The HTML is simple. You’ll need a wrapping element with some children. Give the wrapping element a class for its role ‘ticker’. For each of the children you want it to toggle the active state, add class ‘item’. The first item you want to show should be given the class ‘active’.
<div class="offers ticker">
<li class="item active">10% off your first purchase when you <a href="#">sign up</a>!</li>
<li class="item">Free Shipping on orders over $100!</li>
Next we need some CSS. There is many transitions you can create. I want a crossfade and a vertical movement. I have provided just what is required to make the animation work.
Firstly, check that you have the IP Geolocation option enabled on CloudFlare.
The most efficient way to do this with PHP would be to place the code below in the top of your wp-login.php, but WordPress will overwrite this file when it updates. The next best position is at the top of wp-config.php. If you follow the way WordPress loads, wp-login.php will require wp-load.php first, then after 4 minor lines of code, it will then get wp-config.php.
This is just a different interpretation of my friends script. My version does not allow WordPress to waste CPU before booting the IP from the login page. It also allows for an IP whitelist to bypass this for trusted IP addresses.
It is best to pair this with a plugin like Simple Login Lockdown. There are also some useful .htaccess rules you can use, but I won’t go into that here.
A clients site performs some magic to show different content per subdomain. By default each subdomain asks you to login, which is a bit annoying. It would be convenient if admins of a single WordPress installation could stay logged in when they jump between subdomains. Due to unique requirements, we’re doing this without WordPress Multisite.
I found that all we needed to do was set the cookie domain and path in wp-config.php. At first it seemed only COOKIE_DOMAIN and COOKIEPATH would be needed, but it did not behave until COOKIEHASH was also set. You could probably set it to anything you like, I just had a defined variable already.
* Set cookie properties to allow persistant login across subdomains.
This may also work between WordPress installations across subdomains. I haven’t tested this theory. Both installations would require the same login details and this config. It is working with WordPress versions 3.8+.
FeedWordPress is probably the best free plugin to grab articles from WordPress RSS feeds. Syndication is not the best practice, but it suits the needs of a client and their site network.
With WP_DEBUG enabled, the plugin does show strict standards warnings on newer versions of PHP. The author did add hooks, so we can make some changes in functions.php without editing the plugin.
The worst issue found was with Categories and Tags. WordPress RSS feeds have no differentiation between taxonomies, they are all listed as follows: <category><![CDATA[ Taxonomy ]]></category>. We could have customised the feeds, but then the functionality wouldn’t be compatible with other WordPress sites. The best way around this, is to have your own local Categories, and assign all that don’t match as Tags.
This then brings me to the option ‘Don’t syndicate posts unless they match at least one local Category’. The option doesn’t work. As you can imagine it leads to articles importing without a category assigned, not even ‘Uncategorized’. Without any category at all, these posts don’t display on the website and clutter your archive. The best workaround I could think of to keep these articles useful, was to assign the WordPress default category (or one you desire) as they import.
* FeedWordPress - Assign the WP default category to posts if FWP
As you can see, we managed to get around our FeedWordPress issues without needing to modify a single line of code in a plugin. Maybe this will help you do something similar. I do hope the author will eventually update the plugin to improve the situation.