efaq
Verfasste Forenbeiträge
-
Forum: Allgemeine Fragen
Als Antwort auf: while(have_posts) lädt nicht allesHi,
sorry!! ich hatte gar nicht mehr geantwortet. Okay cool. Danke, dass hilft mir schon mal weiter.
1) Danke für deine Erläuterung. Werden die Parameter in der Queue auch ausgebgen?
2) Wenn ich folgenden Code auf der front-page.php ausgebe, lädt die Seite aber unendlich:
<?php while(have_posts()) { the_content(); } ?>
Warum? Wieso iteriert er hier nicht nur so lange, so lange es Posts gibt? Ich mein klar, er gibt ja die ganze Zeit den content aus, weil die Bedingung true ist. Aber wieso wird es hier unendlich mal ausgegeben, während es wo anders nur so lange ausgegeben wird, solange posts enthalten sind?
Forum: Allgemeine Fragen
Als Antwort auf: CSS Anpassungen verschieden auf Chrome/Firefox/Internet ExplorerDanke euch erstmal für die schnelle Rückmeldung.
Und jup wird alles angepasst. Bzw wurde angepasst 🙂
Okay, dann anders: Bei mir wird – auch nach Löschen des Caches bei Google Chrome folgendes angezeigt: https://www.bilder-upload.eu/bild-2ac460-1577467524.png.html
Wie kriege ich diese Schriftart auch bei anderen Browsern hin? Bzw wie müsste die Skalierung hier aussehen?
Und wird euch beim Internet Explorer auch alles korrekt angezeigt?
Forum: Allgemeine Fragen
Als Antwort auf: jQuery aktivieren auf WordPress-Seitenhab den Code jetzt mal geändert in
<script> jQuery(document).ready(function( $ ) { src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $("div").animate({left: '250px'}); }); }); </script> <button>Start Animation</button> <p>By default, all HTML elements have a static position, and cannot be moved. To manipulate the position, remember to first set the CSS position property of the element to relative, fixed, or absolute!</p> <div style="background:#98bf21;height:100px;width:100px;position:absolute;"></div>
jetzt klappt es wieder nicht. Ich verstehe nicht, warum es vorher ging und diesmal nicht.
Wollte das Beispiel von hier nachbauen: https://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_animation1
Forum: Allgemeine Fragen
Als Antwort auf: jQuery aktivieren auf WordPress-SeitenTop!! Jetzt klappt es bei mir auch. Endlich
und ja klar. ich würde das auslagern dann. Hab es erstmal nur als Test da gelassen.
In der Entwicklungskonsole werden mir folgende Fehlermeldungen angezeigt:(index):12 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ssl.google-analytics.com/ga_exp.js?utmxkey=164043077-1&utmx=&utmxx=&utmxtime=1566998652299, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
(anonymous) @ (index):12
adsbygoogle.js:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
(index):94 Note: The site owner has disabled Google Analytics tracking for your user role.
ga_exp.js:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
1467beb3-a54b-43dd-a31d-008334ceacce.js:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENTKann man die ignorieren?
Und welche Vorteile – bis auf vielleicht schnelle Ladezeit – gibt es noch, wenn man den Code auslagert?
Grüße
Forum: Allgemeine Fragen
Als Antwort auf: jQuery aktivieren auf WordPress-SeitenHi Bego,
sorry erstmal für die späte Rückmeldung. Ich war die letzten beiden Wochen krank. Komme erst jetzt zum Antworten.
Also habe es genauso eingepackt wie du gesagt hast. Aber es klappt leider nach wie vor nicht..
Hier mal der Code von meiner functions.php:
<?php add_action( 'wp_enqueue_scripts', 'my_jquery' ); function my_jquery() { wp_enqueue_script( 'jquery' ); } add_filter( 'wp_default_scripts', $af = static function( &$scripts) { if(!is_admin()) { $scripts->remove( 'jquery'); $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.12.4' ); } }, PHP_INT_MAX ); unset( $af );
Und hier der Code aus meinem Beitrag:
<script> jQuery(document).ready(function( $ ) { $("button").click(function(){ $("p").hide(); }); } </script> <h2>This is a heading</h2> <p>This is a paragraph.</p> <p>This is another paragraph.</p> <button>Click me to hide paragraphs</button>
Dein Code:
jQuery(document).ready(function( $ ) { $("button").click(function(){ $("p").hide(); }); }
wird dieser automatisch im Editor umgewandelt? Weil wenn ich auf „Visuell“ klicke und dann wieder auf „Text“ wird mir der oben genannte Code nach wie vor unverändert angezeigt. also so:
jQuery(document).ready(function( $ ) { $("button").click(function(){ $("p").hide(); }); }
Danke dir für deine Hilfe bis hier hin! Weiß leider einfach nicht, weshalb es nicht klappt.
Forum: Allgemeine Fragen
Als Antwort auf: jQuery aktivieren auf WordPress-SeitenErst mal danke für die schnelle Rückmeldung!
1) der Code von dir
add_action( 'wp_enqueue_script', 'my_jquery' ); function my_jquery() { wp_enqueue_script( 'jquery' ); }
schien bei mir nicht zu klappen. Kam zu einer Fehlmeldung.
meine Functions.php-Datei vom Child-Theme sieht nun so aus:
<?php add_action( 'wp_enqueue_scripts', 'add_my_scripts' ); function add_my_scripts () { wp_enqueue_script( 'my-plugin', // eigener Name get_template_directory_uri() . '/js/jquery.plugin.min.js', // Pfad array('jquery') // Abhängigkeiten ); } add_filter( 'wp_default_scripts', $af = static function( &$scripts) { if(!is_admin()) { $scripts->remove( 'jquery'); $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.12.4' ); } }, PHP_INT_MAX ); unset( $af );
Und die HTML-Seite meines WordPress-Beitrages:
<script> $(document).ready(function(){ jQuery(document).ready(function( $ ) { // $ Works! You can test it with next line if you like // console.log($); }); $("button").click(function(){ $("p").hide(); }); }); </script> <h2>This is a heading</h2> This is a paragraph. This is another paragraph. <button>Click me to hide paragraphs</button>
Leider geht es nach wie vor nicht. Habe ich etwas falsch gemacht?
Forum: Themes
Als Antwort auf: Twenty Twelve Menü Button responsiveGenau das gleiche Problem. Button lässt sich nicht anklicken, ohne dass die Seite neu geladen wird.