Skip to main content

Master Function - homealt() and get_homealt()

Author

Robert Loncaric

Timestamps

Created: 01 August 2024
Modified: 01 August 2024

Similar to alt() and get_alt(), it just gets the website name. Only reason I actually made this one is because a few times I called get_blogdata() instead of get_bloginfo() and got annoyed :)

This is already in the Master.

Steps

Goes to functions.php if not already there.

Call it in front with this:
<?php homealt(); ?>

Goes to functions.php if not already there.

Call it in front with this:
<?php echo get_homealt(); ?>

if ( ! function_exists( 'homealt' ) ) {
    /**
     * Display blog info only.
     */
    function homealt() {
        echo get_bloginfo();
    }
}
if ( ! function_exists( 'get_homealt' ) ) {
    /**
     * Display blog info only.
     */
    function get_homealt() {
        return get_bloginfo();
    }
}