Beiträge von Mr.Quick

    Danke.

    Wenn ich das richtig verstanden habe, müsste der u. s. Code funktioneren, ohne das ich in der functions.php noch etwas ändern muss.?

    Danke voraus.

    PHP
    <meta name="twitter:image" content="<?php $post_thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID),'large'); echo $post_thumbnail[0]; ?>">

    Hab mir einfach mal die Lösung Custom-Field genommen.
    Funktioniert auch. (s.u.). Das reicht mir auch so, da es bei mir nur daraum geht die Seiten zu posten. Davon hab ich max. 15.

    Frage wäre jetzt noch. Muss ich in meinem Twitter-Account TwitterCards jetzt noch extra freischalten?

    Danke voraus.

    Hallo,

    ich versuche Twitter Cards einzubauen.

    Der u.s. Code führt leider zu einem Error in Wordpress.

    https://www.wpbeginner.com/wp-tutorials/h…s-in-wordpress/

    Für Hilfe, Danke voraus.

    Hallo, vielen Dank.

    Das ist der Code aus dem Parent-Theme. Aktuelles Theme: Twentyfifteen 3.0.

    Danke voraus.

    Problem liegt wohl hier...

    default-constants.php

    funtions.php für das Child Theme

    Code
    function child_theme_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-theme-css', get_stylesheet_directory_uri() .'/style.css' , array('parent-style'));
    
    
    }
    add_action( 'wp_enqueue_scripts', 'child_theme_styles' );

    Hallo,

    seit der Umstellung auf PHP 8.0 habe ich Fehlermeldungen im Log.

    Schein was mit dem Child-Theme zu tun haben.

    Für Hilfe, Danke voraus.

    Code
    AH01071: Got error 'PHP message: PHP Warning: Constant TEMPLATEPATH already defined in /var/www/vhosts/example.com/httpdocs/wp-includes/default-constants.php on line 393PHP message: PHP Warning: Constant STYLESHEETPATH already defined in /var/www/vhosts/example.com/httpdocs/wp-includes/default-constants.php on line 400PHP message: PHP Warning: Undefined array key 0 in /var/www/vhosts/example.com/httpdocs/wp-content/themes/twentyfifteen-child/header.php on line 17PHP message: PHP Warning: Attempt to read property "ID" on null in /var/www/vhosts/example.com/httpdocs/wp-content/themes/twentyfifteen-child/header.php on line 17PHP message: PHP Warning: Attempt to read property "ID" on null in /var/www/vhosts/example.com/httpdocs/wp-content/themes/twentyfifteen-child/header.php on line 88PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/vhosts/example.com/httpdocs/wp-content/themes/twentyfifteen-child/header.php on line 88PHP message: PHP Warning: Undefined array key 0 in /var/www/vhosts/example.com/httpdocs/wp-content/themes/twentyfifteen-child/header.php on line 91PHP message: PHP Warning: Attempt to read property "ID" on null in /var/www/vhosts/example.com/httpdocs/wp-content/themes/twentyfifteen-child/header.php on line 91'
    Code
    AH01071: Got error 'PHP message: PHP Warning: Constant TEMPLATEPATH already defined in /var/www/vhosts/example.com/httpdocs/wp-includes/default-constants.php on line 393PHP message: PHP Warning: Constant STYLESHEETPATH already defined in /var/www/vhosts/example.com/httpdocs/wp-includes/default-constants.php on line 400PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/vhosts/example.com/httpdocs/wp-content/themes/twentyfifteen-child/header.php on line 88'
    Code
    AH01071: Got error 'PHP message: PHP Warning: Constant TEMPLATEPATH already defined in /var/www/vhosts/example.com/httpdocs/wp-includes/default-constants.php on line 393PHP message: PHP Warning: Constant STYLESHEETPATH already defined in /var/www/vhosts/example.com/httpdocs/wp-includes/default-constants.php on line 400'