Verified Commit dd137cf5 authored by Jakob Moser's avatar Jakob Moser
Browse files

Adjust for changed language code

parent 7b38cc4e
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -9,6 +9,10 @@
 */

get_header();

function is_german() {
    return str_starts_with(get_bloginfo('language'), 'de');
}
?>
<main class="landing">
    <header>
@@ -21,7 +25,7 @@ get_header();
    <section class="news">
        <?php 
        // Formulate a query for all posts that are displayed on the "blog" page
        if (get_bloginfo('language') === 'de-DE') {
        if (is_german()) {
            $the_query = new WP_Query("pagename=blog"); 
        } else {
            $the_query = new WP_Query("pagename=blog-2"); 
@@ -57,7 +61,7 @@ get_header();

            <div class="more">
                <a href="<?php echo home_url()."/blog/"; ?>"><?php
                    if (get_bloginfo('language') === 'de-DE') {
                    if (is_german()) {
                        echo "Ältere Posts...";
                    } else {
                        echo "older posts...";
@@ -68,7 +72,7 @@ get_header();
    </section>
    <section class="varia">
        <ul class="seamless box-links">
            <?php if (get_bloginfo('language') === 'de-DE'): ?>
            <?php if (is_german()): ?>
                <li>Technische Angebote der Fachschaft und nützliche Links findet ihr im <a href="https://fachschaft.cl.uni-heidelberg.de/portal">Portal</a>.</li>
                <li>Zögert nicht, bei Fragen und Problemen mit uns jederzeit <a href="/kontakt/">Kontakt</a> aufzunehmen.</li>
                <li>Außerdem könnt ihr uns auf <a href="https://www.instagram.com/fs.coli">Instagram</a> folgen, wenn ihr wollt.</li>
@@ -80,7 +84,7 @@ get_header();
        </ul>

        <p>
            <?php if (get_bloginfo('language') === 'de-DE'): ?>
            <?php if (is_german()): ?>
                Ansonsten könnt ihr uns auch einfach irgendwo auf dem Campus abfangen. Es gibt kein Entkommen!
            <?php else: ?>
                You can also just approach us on campus. There is no escape!
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
 * Author: personads :: Maximilian Müller-Eberstein (ursprüngliche Version und Design); Jakob Moser
 * Author URI: https://personads.me/
 *
 * Version: 2.4.0
 * Version: 2.5.0
 * Requires PHP: 8.0
 *
 * License: GNU General Public License v3.0