Beiträge von Marcuss
-
-
Hallo Maxe!
Das weiß ich im Prinzip.
Aber auf einer Test-Installation wird folgender Code problemlos ausgeführt:
PHP<?php tp_show_blogroll_rss_links( array('show_items' => 3, 'category' => false, 'item_order' => 'rand()', 'older_than' => 72, 'show_date' => 1, 'show_image' => 'create-thumbnails', 'thumb_size' => 70, 'show_summary' => 3, 'summary_length' => 100) ); ?> <a href="https://themenfreund.de/blogroll-2" title="Weitere Blogroll-Einträge">Weitere Einträge</a> -
Hallo zusammen!
Auf meiner Webseite themenfreund.de habe ich Probleme mit der Ausführung von PHP in den Widgets.
Es wird eigentlich nur der in das Widget eingegebene Code angezeigt.
Woran kann das liegen?
-
Hallo zusammen!
Ich habe mir das o. g. Plugin zugelegt. Mit diesem kann man Feeds als Posts veröffentlichen.
Das Problem ist, das es den Feed zwar abholt, aber daraus keinen Beitrag erstellt und diesen dann online stellt.
In der Feed-History kommt unter 'Processing Log' diese Meldung: Fetched from RSS feed. Please wait for Processing
Ich habe das Plugin mit einem Theme getestet, das ich auf einer anderen Domain auf dem selben Server nutze. Ich habe dazu die Ordner von der anderen Domain auf die Domain mit dem Problem gezogen - das Problem bleibt. Selbst wenn alle relevanten Plugins - bis auf jene, die das Newspaper Theme benötigt
Nutze ich das Plugin jetzt auf der anderen Domain samt aktivierter Plugins, funktioniert es tadellos. In Null-komma-nichts waren die Feeds der letzten Tage in Beiträge verwandelt und veröffentlicht.
Was könnte das Plugin also auf der Problem-Domain hindern, korrekt zu arbeiten?
Jemand eine Idee?
-
Hallo zusammen!
Ich bekomme jetzt (mit aktueller Version von WP und Plugins) im Backend die Meldung 'Action not allowed'. Unter anderem auch beim Versuch, mich einzuloggen.
Jemand eine Idee, woran das liegen kann?
-
Ich habe jetzt versucht, den Code mit in_category so zu erweitern, das er die Kategorie überprüft.
Code[COLOR=#101094]if[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]![/COLOR][COLOR=#303336]is_admin[/COLOR][COLOR=#303336]()[/COLOR][COLOR=#303336]&&[/COLOR][COLOR=#303336] in_the_loop[/COLOR][COLOR=#303336]()[/COLOR][COLOR=#303336]) && in_category('polizei') [/COLOR][COLOR=#303336]{[/COLOR][/CODE]
Aber leider funktioniert das nicht.
Jemand eine Idee?
-
Hi,
Danke für den Hinweis, das ist mir noch gar nicht aufgefallen
Code
Alles anzeigen[COLOR=#858C93][FONT=inherit]/* Adds date to end of title [/FONT][/COLOR][COLOR=#858C93][FONT=inherit] * @uses Hooked to 'the_title' filter * @args $title(string) - Incoming title * @args $id(int) - The post ID */[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#101094][FONT=inherit]function[/FONT][/COLOR][COLOR=#303336][FONT=inherit] my_add_date_to_title[/FONT][/COLOR][COLOR=#303336][FONT=inherit]([/FONT][/COLOR][COLOR=#303336][FONT=inherit]$title[/FONT][/COLOR][COLOR=#303336][FONT=inherit],[/FONT][/COLOR][COLOR=#303336][FONT=inherit] $id[/FONT][/COLOR][COLOR=#303336][FONT=inherit])[/FONT][/COLOR][COLOR=#303336][FONT=inherit]{[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#858C93][FONT=inherit]// Check if we're in the loop or not[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#858C93][FONT=inherit]// This should exclude menu items[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#101094][FONT=inherit]if[/FONT][/COLOR][COLOR=#303336][FONT=inherit]([/FONT][/COLOR][COLOR=#303336][FONT=inherit]![/FONT][/COLOR][COLOR=#303336][FONT=inherit]is_admin[/FONT][/COLOR][COLOR=#303336][FONT=inherit]()[/FONT][/COLOR][COLOR=#303336][FONT=inherit]&&[/FONT][/COLOR][COLOR=#303336][FONT=inherit] in_the_loop[/FONT][/COLOR][COLOR=#303336][FONT=inherit]()[/FONT][/COLOR][COLOR=#303336][FONT=inherit])[/FONT][/COLOR][COLOR=#303336][FONT=inherit]{[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#858C93][FONT=inherit]// First get the default date format[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#858C93][FONT=inherit]// Alternatively, you can specify your [/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#858C93][FONT=inherit]// own date format instead[/FONT][/COLOR][COLOR=#303336][FONT=inherit] $date_format [/FONT][/COLOR][COLOR=#303336][FONT=inherit]=[/FONT][/COLOR][COLOR=#303336][FONT=inherit] get_option[/FONT][/COLOR][COLOR=#303336][FONT=inherit]([/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]'date_format'[/FONT][/COLOR][COLOR=#303336][FONT=inherit]);[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#858C93][FONT=inherit]// Now get the date[/FONT][/COLOR][COLOR=#303336][FONT=inherit] $date [/FONT][/COLOR][COLOR=#303336][FONT=inherit]=[/FONT][/COLOR][COLOR=#303336][FONT=inherit] get_the_date[/FONT][/COLOR][COLOR=#303336][FONT=inherit]([/FONT][/COLOR][COLOR=#303336][FONT=inherit]$date_format[/FONT][/COLOR][COLOR=#303336][FONT=inherit],[/FONT][/COLOR][COLOR=#303336][FONT=inherit] $id[/FONT][/COLOR][COLOR=#303336][FONT=inherit]);[/FONT][/COLOR][COLOR=#858C93][FONT=inherit]// Should return a string[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#858C93][FONT=inherit]// Now put our string together and return it[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#858C93][FONT=inherit]// You can of course tweak the markup here if you want[/FONT][/COLOR][COLOR=#303336][FONT=inherit] $title [/FONT][/COLOR][COLOR=#303336][FONT=inherit].=[/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]' ('[/FONT][/COLOR][COLOR=#303336][FONT=inherit].[/FONT][/COLOR][COLOR=#303336][FONT=inherit] $date [/FONT][/COLOR][COLOR=#303336][FONT=inherit].[/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]')'[/FONT][/COLOR][COLOR=#303336][FONT=inherit];[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#303336][FONT=inherit]}[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#858C93][FONT=inherit]// Now return the string[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#101094][FONT=inherit]return[/FONT][/COLOR][COLOR=#303336][FONT=inherit] $title[/FONT][/COLOR][COLOR=#303336][FONT=inherit];[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#303336][FONT=inherit]}[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#858C93][FONT=inherit]// Hook our function to the 'the_title' filter[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#858C93][FONT=inherit]// Note the last arg: we specify '2' because we want the filter[/FONT][/COLOR][COLOR=#303336][FONT=inherit] [/FONT][/COLOR][COLOR=#858C93][FONT=inherit]// to pass us both the title AND the ID to our function[/FONT][/COLOR][COLOR=#303336][FONT=inherit] add_filter[/FONT][/COLOR][COLOR=#303336][FONT=inherit]([/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]'the_title'[/FONT][/COLOR][COLOR=#303336][FONT=inherit],[/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]'my_add_date_to_title'[/FONT][/COLOR][COLOR=#303336][FONT=inherit],[/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]10[/FONT][/COLOR][COLOR=#303336][FONT=inherit],[/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]2[/FONT][/COLOR][COLOR=#303336][FONT=inherit]);[/FONT][/COLOR] -
Hallo zusammen!
Ich bin auf der Suche nach einer Möglichkeit, das aktuelle Datum in die Überschrift eines Posts auf folgendes Snippet gestoßen:
PHP
Alles anzeigen* Adds date to end of title [COLOR=#1D2129][FONT=Helvetica]* @uses Hooked to 'the_title' filter * @args $title(string) - Incoming title * @args $id(int) - The post ID[/FONT][/COLOR] [FONT=inherit]function my_add_date_to_title($title, $id) {[/FONT] [FONT=inherit]// Check if we're in the loop or not // This should exclude menu items if ( !is_admin() && in_the_loop() ) {[/FONT] [FONT=inherit]// First get the default date format // Alternatively, you can specify your // own date format instead $date_format = get_option('date_format');[/FONT] [FONT=inherit]// Now get the date $date = get_the_date($date_format, $id); // Should return a string[/FONT] [FONT=inherit]// Now put our string together and return it // You can of course tweak the markup here if you want $title .= ' (' . $date . ')'; }[/FONT] [FONT=inherit]// Now return the string return $title; }[/FONT] [FONT=inherit]// Hook our function to the 'the_title' filter // Note the last arg: we specify '2' because we want the filter // to pass us both the title AND the ID to our function [/FONT] add_filter('the_title','my_add_date_to_title',10,2);*/Wie könnte man das so abändern, das es nur in Artikeln erscheint, in denen man es auch haben möchte? Also in dem man quasi also ein Platzhalter verwendet.
Ich will es in meinem Regionalmagazin verwenden, um den Polizeibericht, den ich per Feed abrufe, mit dem aktuellen Datum zu versehen.
-
Dann wärt ihr mit einem Plugin wie dem doch viel besser bedient, oder? https://wordpress.org/plugins/widget…time-scheduler/
-
Ich hab jetzt keine Lösung für Dich, aber willst Du Deine Besucher mit Macht darauf stoßen, das sie nichts aktuelle(re)s zu lesen kriegen?
-
Hallo zusammen!
Ich arbeite mit dem o. g. Plugin.
Nun habe ich auf einem Blog neuerdings Probleme beim speichern. Es erscheint nach dem Klick auf das Speicherbutton folgende Meldung
ZitatEs wurde noch kein Vorschaubild erstellt für das Bild 'td_1920x0'
Dabei habe ich diese Größe gar nicht ausgewählt, sondern z. B. nur 1068 x 580
Die Log-Datei sagt dazu folgendes:
ZitatAlles anzeigen[DEBUG ][2017-07-31T11:00:07+00:00][ PARAMETERS: Array(
[action] => pte_ajax
[pte-action] => iframe
[pte-id] => 7761
) ]
[DEBUG ][2017-07-31T11:00:07+00:00][ PTE-VERSION: 2.4.8
USER-AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36
WORDPRESS: 4.8 ]
[DEBUG ][2017-07-31T11:00:08+00:00][ PARAMETERS: Array
(
[action] => pte_ajax
[id] => 7761
[pte-action] => get-thumbnail-info
) ]
[WARNUNG][2017-07-31T11:00:08+00:00][ Couldn't find or generate metadata for image: 7761-td_1920x0 ]
[DEBUG ][2017-07-31T11:00:36+00:00][ PARAMETERS: Array
(
[action] => pte_ajax
[h] => 570.2483443708609
[id] => 7761
[pte-action] => resize-images
[pte-nonce] => 5b1365e049
[pte-sizes] => Array
(
[0] => td_1068x580
)[w] => 1048.8496551724136
[x] => 130.13333333333333
[y] => 74.75165562913908
) ]
[DEBUG ][2017-07-31T11:00:36+00:00][ BASE FILE DIMENSIONS/INFO: Array
(
[0] => 1280
[1] => 645
[2] => 2
[3] => width="1280" height="645"
[bits] => 8
[channels] => 3
[mime] => image/jpeg
) ]
[DEBUG ][2017-07-31T11:00:36+00:00][ GETwidthheightCROPPED ]
[DEBUG ][2017-07-31T11:00:36+00:00][ WIDTHxHEIGHT: 1068 x 580 ]
[DEBUG ][2017-07-31T11:00:36+00:00][ COMPRESSION: 85 ]
[DEBUG ][2017-07-31T11:00:36+00:00][ COMPRESSION: 85 ]
[DEBUG ][2017-07-31T11:00:36+00:00][ EDITOR: ImageMagick ]
[DEBUG ][2017-07-31T11:00:36+00:00][ COMPRESSION: 85 ]
[DEBUG ][2017-07-31T11:00:39+00:00][ PARAMETERS: Array
(
[action] => pte_ajax
[id] => 7761
[pte-action] => confirm-images
[pte-confirm] => Array
(
[td_1068x580] => xxx-1068x580-1501498836.jpg
)[pte-nonce] => 794f89ec95
) ]
[DEBUG ][2017-07-31T11:00:39+00:00][ pte_get_all_alternate_size_information returned: Array
(
[td_1068x580] => Array
(
[width] => 1068
[height] => 580
[crop] => 1
[current] => Array
(
[file] => xxx-1068x580-1501498567.jpg
[width] => 1068
[height] => 580
[path] => 2017/07/xxx-1068x580-1501498567.jpg
[url] => https://xxxx/uploads/2017/07/hxxx-1068x580-1501498567.jpg
))
) ]
[DEBUG ][2017-07-31T11:00:39+00:00][ Deleting old thumbnail: xxx/uploads/2017/07/xxx-1068x580-1501498567.jpg ]
[DEBUG ][2017-07-31T11:00:39+00:00][ Moving 'xxx/uploads/ptetmp/7761/xxx-1068x580-1501498836.jpg' to 'xxx/uploads/2017/07/hochwasser-hildesheim-1068x580-1501498836.jpg' ]
[DEBUG ][2017-07-31T11:00:39+00:00][ Updating 'td_1068x580' metadata: Array
(
[file] => hochwasser-hildesheim-1068x580-1501498836.jpg
[width] => 1068
[height] => 580
) ]Jemand eine Idee?
Auf einem anderen Blog - auf dem gleichen Server - funktioniert das Problemlos! Aber ich habe in der functions.php, der header oder der footer.php nichts stehen, das da irgendwie eingreifen könnte. Der Fehler taucht auch auf, wenn alle anderen Plugins deaktiviert sind.
-
Hallo zusammen!
Ich arbeite auf einem Blog mit den Plugins Dynamic Widgets und Content aware Sidebars.
Leider musste ich jetzt die Tage feststellen, das die Widgets aus den Sidebars verschwunden sind.
Bei beiden Plugins sind noch die korrekten Einstellungen vorhanden, aber die widgets werden eben nicht angezeigt.
Jemand eine Idee, worin der Fehler liegen könnte?
-
Hallo zusammen!
Ich nutze das Free-Plugin the events calendar und möchte mit dem Event Aggregator Veranstaltungen von FB regelmäßig einspielen lassen.
Das Problem nur: Er aktualisiert sich nicht selbstständig.
Auf einer Test-Installation klappt es aber reibungslos.
Ich habe mir mal die Datenbanken angeschaut, und festgestellt, das bei der Test-Installation in der options-Tabelle mehr Einträge bzgl. des Aggregators vorhanden sind, als auf der Live-Seite.
Auch die verschiedensten Maßnahmen (Plugin gelöscht, alle Plugins deaktiviert, etc.) haben nicht geholfen.
Jemand eine Idee, woran es liegen kann, das Einträge nicht in die DB geschrieben werden (können)??
-
Ich habe mir jetzt noch einmal die beiden Seiten angeschaut, wo es nicht funktioniert und wo es läuft.
Dabei ist mir aufgefallen, das die Darstellung des Widgetbereiches völlig unterschiedlich ausfällt.
Beim 1. angehängten Bild ist es die Seite mit dem 'kaputten' Widget, das zweite zeigt das Bild mit dem funktionierenden Widget. Also muss es - meiner Logik zufolge, doch mit Wordpress zusammenhängen, oder nicht?
-
Ich habe die diesbezüglichen Fehler soweit abgestellt.
Auch habe ich wieder alle Plugins deaktiviert, die einzelnen Dateien im Child-Theme mal umbenannt - alles das gleiche Ergebnis. Selbst der Wechsel auf das Parent-Theme bringt nichts (und daran habe ich nicht geschraubt).
Auch habe ich mal nach den Unterschieden in den wp-config-Dateien gesucht bei einem Blog, wo es funktioniert. Ich kann da nichts erkennen, das einen dramatischen Unterschied ausmachen kann.
-
So, habe nun mal das Backend in FF geöffnet, dort das Text-Widget aufgerufen und die Konsole laufen lassen:
ZitatTypeError: wp.mediaWidgets is undefined[Weitere Informationen] widgets.php:60:1 <anonym>
Selbiges dann noch mal für 64:1, 72, 80, 89
Hinzu kommt der Fehler
ZitatReferenceError: aop_around is not defined[Weitere Informationen] widgets.php:542:1
<anonym>und
[quote]TypeError: this.$widgetContainer.find(...).draggable is not a function[Weitere Informationen] widgets.min.js:7:305
enhancedWidgetManager https://domain/...//plugins/c…ts.min.js:7:305
init https://domain/.../plugins/co…ts.min.js:7:197
<anonym> https://domain/.../plugins/co…s.min.js:7:3073
i https://domain/wp-admin/load-scripts.php:2:27444
fireWith https://domain/wp-admin/load-scripts.php:2:28213
ready https://domain/wp-admin/load-scripts.php:2:30004
K[quote] -
Ich habe das http schon auf https angepasst. In der Konsole (Backend) wird jetzt nichts mehr angezeigt - außer zwei Bild-Datei-Fehlern
-
Habe das https angepasst, jetzt erfolgt keine Meldung mehr
-
Was wird bei deaktiviertem Plugin "WP Widget Cache" beim Aufruf der Widgets-Seite in der Browser-Console angezeigt?
Zum einen:
ZitatMixed Content: The page at 'https://themenfreund.de/' was loaded over HTTPS, but requested an insecure script 'http://ajax.googleapis.com/ajax/libs/jque…2/jquery.min.js'. This request has been blocked; the content must be served over HTTPS.
zum anderen: Uncaught ReferenceError: jQuery is not defined
-
Gleiche Situation/gleiches Theme?
Nein, aber bei einer Seite mit dem gleichen Theme tritt der selbe Fehler auf.
Aber am Theme liegt es nicht, ich habe schon das aktuelle Wordpress-Theme aktiviert, die Version 4.7.5 aufgespielt und dann wieder 4.8. Kein Text-Feld