Das verstehe ich irgendwie noch nicht. ist das oben jetzt richtig eigentlich oder nicht? Wie gesagt ich sehe kein Bild weiss aber auch nicht was die genaue Ausgabe von
php echo get_stylesheet_directory_uri()
ist! Wie kann ich das testen oder sehen?
Beiträge von Snewi
-
-
OK danke so klappt es auch. Hatte mich nur gewundert das eine andere Seite funktioniert wo es im Unterordner steht.
Schöne WE und bleibt gesund -
Guten Morgen, ja dann klappt es auch wenn die im root steht. aber in der functions.php sage ich doch wo diese stehe muss. Bei einer anderen Seite klappt das auch so.
Codefunction child_theme_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-theme-css', get_stylesheet_directory_uri() .'/css/style.css' , array('parent-style')); } add_action( 'wp_enqueue_scripts', 'child_theme_styles' ); require_once locate_template('/functions/fontawesome.php'); require_once locate_template('/functions/login.php'); require_once locate_template('/functions/sitemap.php');Das steht in der funktion.php
LG
-
Hallo, ich habe bei meiner Seite ein Child-Theme installiert wo ich natürlich in der functions.php auf die style.css im child.theme root verwiesen habe. Jetzt habe ich einwenig meine Struktur geändert und die style.css in den Unterordner /css gelegt und auch in der funktions.php den verweis geändert.
Jetzt ist aber auf einmal meine Formatierung zerschossen. Woran liegt das? Oder was habe ich bei der Umstrukturierung nicht beachtet?LG
-
Hi, ich versuche krampfhaft ein Bild was im Ordner Images im Child-Theme liegt zu verwenden und anzuzeigen.
Mein Pfad ist:
Ich benutze folgenden Code:
Es wird nur leider nix ausgegeben. Wo ist mein Fehler?
LG
-
Wenn es schwierig wird die meisten externen Daten zu den Fonts zu unterbinden, dann kann ich sie ja auch gleich nicht DSGVO Konform verwenden :-) Wäre denn der Zugriff via CDN oder dem neuen FA Kit auch rechtskonform?
-
GIbt es da ne Möglichkeit das über die functions.php einzubinden auch bei den ganz neuen? ODer sollte ich vielleicht sogar lieber die IcoMoons verwenden?
LG -
Hallo, ich brauche mal eure Hilfe bezüglich FontAwsome Icons. Wie kann ich sie standardmäßig in mein Child Theme lokal am besten mit aufnehmen? per CDN oder Kit oder doch selber loacal hosten? Irgendwie finde ich viele Möglichkeiten, weiss aber gerade nicht welche auch was DSGVO angeht noch die richtige ist. Am liebsten möchte ich es einmal einbinden ohne Plugin und dann soll es laufen, auch das es natürlich mit anderen Versionen die über Plugins oder Themes eingesetzt werden kollidieren. Habt ihr da nen Tipp und ne Anleitung für mich was jetzt das richtige ist?
LG
-
Heisst das wenn ich den REst auch ausgeblendet habe möchte muss ich den Code noch erweitern? Gibt es ne Möglichkeit das automatisch alles zu amchen?
-
die Seite ist zur Zeit noch Offline. ich habe den Code in meinem Child_theme in der function.php.
-
Hallo, ich habe in der functions.php folgende Code um im Quelltext die ganzen Header-Inhalte zu verstecken.
Code
Alles anzeigenadd_action('init', 'aufraeumen'); function aufraeumen() { remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'wp_generator'); remove_action('wp_head', 'index_rel_link'); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'feed_links', 2); remove_action('wp_head', 'feed_links_extra', 3); remove_action('wp_head', 'parent_post_rel_link', 10, 0); remove_action('wp_head', 'start_post_rel_link', 10, 0); remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0); remove_action('wp_head', 'wp_shortlink_header', 10, 0); remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0); }Irgendwie funktioniert das aber nicht und der HEader ist weiterhin voll mit Infos zu Wordpress. ISt das überhaupt korrekt was ich da gemacht habe? Oder macht es Sinn eganz anders zu machen. Wie räume ich den ganzen Quelltext mal auf?
LG
-
<IfModule mod_deflate.c> # Insert filters / compress text, html, javascript, css, xml: AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/vtt AddOutputFilterByType DEFLATE text/x-component AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/js AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/x-httpd-php AddOutputFilterByType DEFLATE application/x-httpd-fastphp AddOutputFilterByType DEFLATE application/atom+xml AddOutputFilterByType DEFLATE application/json AddOutputFilterByType DEFLATE application/ld+json AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE application/x-font-ttf AddOutputFilterByType DEFLATE application/font-woff2 AddOutputFilterByType DEFLATE application/x-font-woff AddOutputFilterByType DEFLATE application/x-web-app-manifest+json font/woff AddOutputFilterByType DEFLATE font/woff AddOutputFilterByType DEFLATE font/opentype AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE image/x-icon
ist aber vorhanden
-
verwenden:
ab Zeile 806 bis 889
https://github.com/r23/MyOOS/blob/master/wordpress/.htaccessWenn ich das anwende, dann ändert sich nix. Es bleibt bei Grade 1. Bin bei All-Inkl
-
Aber warum fehlt die gzip compression wenn sie doch eigentlich in der htaccess steht?
-
Hallo,
ich habe über meine .htaccess die gzip Komprimierung und das Caching aktiviert.Benutze hier die .htaccess von Andreas Hecht.
Code
Alles anzeigen# Serve resources with far-future expires headers. # # (!) If you don't control versioning with filename-based # cache busting, you should consider lowering the cache times # to something like one week. # # https://httpd.apache.org/docs/current/mod/mod_expires.html <IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 1 month" # CSS ExpiresByType text/css "access plus 1 year" # Data interchange ExpiresByType application/atom+xml "access plus 1 hour" ExpiresByType application/rdf+xml "access plus 1 hour" ExpiresByType application/rss+xml "access plus 1 hour" ExpiresByType application/json "access plus 0 seconds" ExpiresByType application/ld+json "access plus 0 seconds" ExpiresByType application/schema+json "access plus 0 seconds" ExpiresByType application/vnd.geo+json "access plus 0 seconds" ExpiresByType application/xml "access plus 0 seconds" ExpiresByType text/xml "access plus 0 seconds" # Favicon (cannot be renamed!) and cursor images ExpiresByType image/vnd.microsoft.icon "access plus 1 week" ExpiresByType image/x-icon "access plus 1 week" # HTML - Behält die Website eine Stunde im Cache, neues wird erst nach Ablauf einer Stunde # angezeigt. Wenn nicht gewuenscht, bei 3600 eine Null eintragen ExpiresByType text/html "access plus 0 seconds" # JavaScript ExpiresByType application/javascript "access plus 1 year" ExpiresByType application/x-javascript "access plus 1 year" ExpiresByType text/javascript "access plus 1 year" # Manifest files ExpiresByType application/manifest+json "access plus 1 week" ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" ExpiresByType text/cache-manifest "access plus 0 seconds" # Media files ExpiresByType audio/ogg "access plus 1 year" ExpiresByType image/bmp "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/svg+xml "access plus 1 year" ExpiresByType image/webp "access plus 1 year" ExpiresByType video/mp4 "access plus 1 year" ExpiresByType video/ogg "access plus 1 year" ExpiresByType video/webm "access plus 1 year" # Web fonts # Embedded OpenType (EOT) ExpiresByType application/vnd.ms-fontobject "access plus 1 year" ExpiresByType font/eot "access plus 1 year" # OpenType ExpiresByType font/opentype "access plus 1 year" # TrueType ExpiresByType application/x-font-ttf "access plus 1 year" # Web Open Font Format (WOFF) 1.0 ExpiresByType application/font-woff "access plus 1 year" ExpiresByType application/x-font-woff "access plus 1 year" ExpiresByType font/woff "access plus 1 year" # Web Open Font Format (WOFF) 2.0 ExpiresByType application/font-woff2 "access plus 1 year" # Other ExpiresByType text/x-cross-domain-policy "access plus 1 week" </IfModule> <IfModule mod_deflate.c> # Insert filters / compress text, html, javascript, css, xml: AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/vtt AddOutputFilterByType DEFLATE text/x-component AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/js AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/x-httpd-php AddOutputFilterByType DEFLATE application/x-httpd-fastphp AddOutputFilterByType DEFLATE application/atom+xml AddOutputFilterByType DEFLATE application/json AddOutputFilterByType DEFLATE application/ld+json AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE application/x-font-ttf AddOutputFilterByType DEFLATE application/font-woff2 AddOutputFilterByType DEFLATE application/x-font-woff AddOutputFilterByType DEFLATE application/x-web-app-manifest+json font/woff AddOutputFilterByType DEFLATE font/woff AddOutputFilterByType DEFLATE font/opentype AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE image/x-icon # Exception: Images SetEnvIfNoCase REQUEST_URI \.(?:gif|jpg|jpeg|png|svg)$ no-gzip dont-vary # Drop problematic browsers BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html # Make sure proxies don't deliver the wrong content Header append Vary User-Agent env=!dont-vary </IfModule> #Alternative caching using Apache's "mod_headers", if it's installed. #Caching of common files - ENABLED <IfModule mod_headers.c> <FilesMatch "\.(ico|pdf|flv|swf|js|css|gif|png|jpg|jpeg|txt|woff2|woff)$"> Header set Cache-Control "max-age=31536000, public" </FilesMatch> </IfModule> <IfModule mod_headers.c> <FilesMatch "\.(js|css|xml|gz)$"> Header append Vary Accept-Encoding </FilesMatch> </IfModule> # Set Keep Alive Header <IfModule mod_headers.c> Header set Connection keep-alive </IfModule> # If your server don't support ETags deactivate with "None" (and remove header) <IfModule mod_expires.c> <IfModule mod_headers.c> Header unset ETag </IfModule> FileETag None </IfModule> <IfModule mod_headers.c> <FilesMatch ".(js|css|xml|gz|html|woff|woff2|ttf)$"> Header append Vary: Accept-Encoding </FilesMatch> </IfModule>Jetzt habe ich mir meine Webseite mit Pingdom Tools mal angeschaut um bekomme den Hinweis bezüglich gzip Compression von 1.
Meine Seite zeigt folgende Info dazu:
CodeCache-Control: no-cache, must-revalidate, max-age=0 Connection: keep-alive, Keep-Alive Content-Encoding: br Content-Type: text/html; charset=UTF-8 Date: Wed, 11 Mar 2020 15:08:51 GMT Expect-CT: enforce, max-age=21600 Expires: Wed, 11 Jan 1984 05:00:00 GMT Keep-Alive: timeout=2, max=1000Heisst das jetzt genau das der Cache und vor allem die gzip Compression gar nicht aktiviert ist?
Was müsste ich tun damit das vernünftig läuft?LG Snewi
-
Welches Plugin ähnlich das EasyAdmin von AIT könnt ihr denn empfehlen?
-
Gibt es keine Möglichkeit, entweder wie bei AIT easy Admin auf ein eigenes Frontend zu verlinken wo die Verwaltung der Beiträge stattfindet. ODer das man wenn man verlinked automatisch den Verzeichnisschutz über Benutzer und Passwort setzt?!!
Gruß
-
Hallo, ich habe eine Seite wo ich einem Redakteur den Zugang über das Frontend geben möchte. Er soll also zb über die Hompage auf Login (link zum Backend) sich einloggen können. Das Problem, auf das wp-admin liegt ein Verzeichnisschutz. Wie kann ich das ganze am besten gestalten? Gibt es vielleicht ein Plugin wo es eine eigene Admin-Seite gibt die man selber gestalten kann mit den Inhalten die von Redakteur gepflegt werden können?
LG Snewi
-
Könnte ich auch als erstes eine 301 Weiterleitung machen das wenn ich meine URL aufrufe immer nach wp-admin weitergeleitet werde? Und dann noch einen zusätzlichen Verzeichnisschutz einbauen?
LG
-
Es läuft alles super. Wie kann ich denn wenn ich die Subdomain aufrufe die Ansicht sperren oder die Seite nicht anzeigen sondern nur das Backend wenn ich es auch aufrufe?