All posts by
Read users country code
Enable Geolocation in cloudflare Cloudflare settings > Network > IP Geolocation = On Reading the value Gives you the country of the user in ISO 3166-1 Alpha 2 format.
Prevent PHP function being run on different threads
Using directory approach
Using shortcodes inside a shortcode
Use the do_shortcode() function Assigning the output of do_shortcode() to a string and returning from the function with it didn’t work in our test, but echo did
json encode
Convert Array To json
Vertical Align
Good resources https://blog.logrocket.com/13-ways-to-vertical-center/ Classic align middle method The translateY repositions the element vertically so that it becomes centered at the 50% point itself For center aligned text: Place an image in the center of the browser window Placing text at the bottom of the screen
Fill remaining width
For the final div don’t use float, use overflow: hidden instead An example http://jsfiddle.net/posco2k8/vu8dV
input boxes
input box types Input boxes Basic Styling Specific Boxes input type=”submit” See here
Button auto size
Expand as needed to fit text Solution is to set it to inline-block:
Get Page URI / URL
Get just the domain name $_SERVER[‘HTTP_HOST’] gives you the domain name through which the current request is being fulfilled Get site URL Get full page URL (domain name + page + any arguments) Page URL (With Arguments) Stripping Page URL Getting URL without the arguments Getting just the URL arguments Will get everything after the […]