Tag: php
-
Update PHP in the year of 2021
I saw a notification to update PHP on the WordPress Dashboard of this blog. I saw in the server’s Control Panel that PHP has been setup to version 7.3. I then saw the Requirements page on the wordpress.org site. The minimum PHP version recommended by the wordpress.org website today is version 7.4. As mentioned by…
-
WordPress: Add Title to IMG tag using Get The Image plugin
Get The Image plugin from Justin Tadlock is awesome, a script that can grab an image by custom field input, WordPress’ featured image, post attachment, or extracting it from the post’s content. Recently, someone asked about how to add Title to IMG tag. We know ALT attributes in IMG tag, but IMG tag also support…
WordPress Conditional Tag for Login Page
WordPress have conditional tags. The Conditional Tags can be used in your Template files to change what content is displayed and how that content is displayed on a particular page depending on what conditions that page matches Following conditional tag is specific to Login Page, that is currently not available on WordPress Codex
Keep HTML Tags in WordPress Limit Posts – the_content_limit
This function, the_content_limit controls the maximum amount of characters displayed for an entry on the main page on WordPress homepage posts, e.g Featured Posts, Recent Posts However , the_content_limit stripped HTML tags just like the_excerpt. What if we want to keep HTML tags We make modification to the function, the_content_limit which is usually found in functions.php…
PHP : Find Path to Base Directory
This script output the path to your base directory (aka “Document Root”), this code also useful to debug PATH in PHP errors This script output the path to your base directory with current working dir