Commit 6639fe81 authored by Jakob Moser's avatar Jakob Moser
Browse files

Append site description to title on front page

parent 479cc4e2
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ get_header();
    <head>
        <title>
            <?php
                // In certain cases, display a prefix followed by |
                if(is_home()) {
                    echo 'Blog | ';
                } elseif(is_search()) {
@@ -22,7 +23,15 @@ get_header();
                    // So, to be on the safe side, we escape it here.
                    echo esc_html(get_the_title($post->ID)).' | ';
                }

                // Always show the name of the site
                bloginfo('name');

                // In certain cases, display | followed by a suffix
                if(is_front_page()) {
                    echo ' | ';
                    bloginfo('description');
                }
            ?>
        </title>