[FONT=Arial][size=10][COLOR=#000080]Fatal error: Call to a member function on a non-object in /home/www/blogdatum.phtml on line 26[/COLOR][/SIZE][/FONT]
Ich bin noch mal in mich gegangen. War aber auch nichts los. ;-)
Im Ernst: Zunächst hatte ich das Script in eine .phtml-Datei mit etwas HTML eingebaut. Ich hatte den Verdacht, dass das Drumherum Probleme macht und habe jetzt eine .php-Datei nur mit den PHP-Zeilen
[FONT=Courier New]<?php
global $wpdb;
$lastupdate = $wpdb->get_var("SELECT post_modified FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_modified DESC LIMIT 1");
$formatiertesDatum = strftime('%d.%m.%Y', $lastupdate);
print $formatiertesDatum;
?>
[/FONT]
erstellt. Damit ändert sich die Fehlermeldung in
Fatal error: Call to a member function on a non-object in /home/www/blogdate.php on line 3
Das ist alles.
WordPress liegt bei mir auf /home/www/wordpress, und die HTML-Datei, die das Datum anzeigen soll, eine Etage höher.
Entweder bin ich blind oder blöd oder ... es hat doch noch jemand die Lösung.
Hoffnungsvoll
AnselmR