I’m submitting a quite handy function to apply WordPress Pagination in Bootstrap 4 Style. This function contains First/Last, Previous/Next, Current and total number of pages. You can use the code for pagination in your Bootstrap 4 powered WordPress theme. It works with Custom Post Types and hides First/Last, Previous/Next texts on small devices (viewport width < 768 px)
Have you ever tried to save a webp image as jpg or png? And wondering it’s downloaded or saved as webm instead of usual png or jpg extension. So here are quick fixes to convert or save webm image to jpg / png before or after download.
This article is intended to those who wish to install Redis and PHP extension for interfacing with Redis on their XAMPP installation on windows. As I had required once to setup a Redis Server on my local development machine and utilize it as it was not possible to test on a production environment.
While working with MySQL database there might be situation when you wish to update certain column only if the value being updated is greater than existing value or current value stored in that column. MySQL GREATEST and LEAST functions are quite handy in such situations. Let’s see how can we use first function to update a column if value is greater than current value.
When you setup App on Facebook and try to make login with Facebook available in your script, everything seems fine but when someone attempt to login with a Facebook account he/she gets either of these errors from Facebook: App Not Setup: This app is still in development mode, and you don’t have access to it. Switch to a registered test user or ask an app admin for permissions. The developers of this app have not set up this app properly for Facebook Login.
It’s quite common to use background image and place text above it but it’s also possible to use image in foreground and place text above foreground image overlay. You can also horizontal center or vertical center the text as explained in the article.
So our page contains a piece of HTML as follow:
Here are 2 ways which you can use whenever you need to center a column div within `.container` in Twitter Bootstrap 3 as well as to keep empty space outside the `div` to be evenly distributed. First approach uses offset feature available in Bootstrap while it has a limitation and second approach is using `center-block` class with setting `float: none` in Twitter Bootstrap.
Have you ever used a function call in `empty()` for an `if` condition to perform some checking? Then you might come up with an PHP fatal error saying Can’t use method return value in write context. I am explaining here why did the error come and 2 ways to write them correctly.
Selecting element with two or more attributes in your html page is not a trivial task. It’s just a very simple line of jQuery selector when it comes to select element with multiple attributes. So let us see what is that.
In MySQL we create tables and build relationship among them. In the process if we need to truncate foreign key constrained table then we can’t do it simply and MySQL will throw an error even we have already removed table having foreign key constraint:
ERROR 1701 (42000): Cannot truncate a table referenced in a foreign key constraint…