Verfasste Forenbeiträge

Ansicht von 15 Antworten - 31 bis 45 (von insgesamt 52)
  • Thread-Starter philipp2208

    (@philipp2208)

    Ok. ich probier es mal mit WP Debugging. Ich habe eine Seite mit einem Child Theme erstellt, die ich jetzt ganz gerne davon unabhängig machen würde und deswegen am schauen, was ich aus dem Parent-Theme an Code übernehmen kann und was ich besser an die Funktionalität meines Themes anpasse. Einfach nur die Meldung Word Press Error ist da zu unspezifisch. Danke aber auf jeden Fall!

    Thread-Starter philipp2208

    (@philipp2208)

    Ok. sorry. Nächstes mal mit der Code Taste. Was heisst das denn jetzt und wie kriege ich den Debug-Mechanismus zum Laufen?

    Thread-Starter philipp2208

    (@philipp2208)

    /* That’s all, stop editing! Happy blogging. */ taucht bei mir nur in der wp-config-sample.php auf und nicht in der wp-config.php. Hier mal die beiden Dateien:

    wp-config.php

    <?php
    /***
     * WordPress's Debianised default master config file
     * Please do NOT edit and learn how the configuration works in
     * /usr/share/doc/wordpress/README.Debian
     ***/
    
    /* Look up a host-specific config file in
     * /etc/wordpress/config-<host>.php or /etc/wordpress/config-<domain>.php
     */
    $debian_server = preg_replace('/:.*/', "", $_SERVER['HTTP_HOST']);
    $debian_server = preg_replace("/[^a-zA-Z0-9.\-]/", "", $debian_server);
    $debian_file = '/etc/wordpress/config-'.strtolower($debian_server).'.php';
    /* Main site in case of multisite with subdomains */
    $debian_main_server = preg_replace("/^[^.]*\./", "", $debian_server);
    $debian_main_file = '/etc/wordpress/config-'.strtolower($debian_main_server).'.php';
    
    if (file_exists($debian_file)) {
        require_once($debian_file);
        define('DEBIAN_FILE', $debian_file);
    } elseif (file_exists($debian_main_file)) {
        require_once($debian_main_file);
        define('DEBIAN_FILE', $debian_main_file);
    } elseif (file_exists("/etc/wordpress/config-default.php")) {
        require_once("/etc/wordpress/config-default.php");
        define('DEBIAN_FILE', "/etc/wordpress/config-default.php");
    } else {
        header("HTTP/1.0 404 Not Found");
        echo "Neither <b>$debian_file</b> nor <b>$debian_main_file</b> could be found. <br/> Ensure one of them exists, is readable by the webserver and contains the right password/username.";
        exit(1);
    }
    
    /* Default value for some constants if they have not yet been set
       by the host-specific config files */
    if (!defined('ABSPATH'))
        define('ABSPATH', '/usr/share/wordpress/');
    if (!defined('WP_CORE_UPDATE'))
        define('WP_CORE_UPDATE', false);
    if (!defined('WP_ALLOW_MULTISITE'))
        define('WP_ALLOW_MULTISITE', true);
    if (!defined('DB_NAME'))
        define('DB_NAME', 'wordpress');
    if (!defined('DB_USER'))
        define('DB_USER', 'wordpress');
    if (!defined('DB_HOST'))
        define('DB_HOST', 'localhost');
    if (!defined('WP_CONTENT_DIR') && !defined('DONT_SET_WP_CONTENT_DIR'))
        define('WP_CONTENT_DIR', '/var/lib/wordpress/wp-content');
    
    /* Default value for the table_prefix variable so that it doesn't need to
       be put in every host-specific config file */
    if (!isset($table_prefix)) {
        $table_prefix = 'wp_';
    }
    
    if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
        $_SERVER['HTTPS'] = 'on';
    
    require_once(ABSPATH . 'wp-settings.php');
    
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_DISPLAY', true);
    define( 'WP_DEBUG_LOG', true );
    define( 'SCRIPT_DEBUG', true );
    
    ?>

    wp-config-sample.php

    <?php
    /**
     * The base configuration for WordPress
     *
     * The wp-config.php creation script uses this file during the
     * installation. You don't have to use the web site, you can
     * copy this file to "wp-config.php" and fill in the values.
     *
     * This file contains the following configurations:
     *
     * * MySQL settings
     * * Secret keys
     * * Database table prefix
     * * ABSPATH
     *
     * @link https://codex.wordpress.org/Editing_wp-config.php
     *
     * @package WordPress
     */
    
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    
    define( 'DB_NAME', 'database_name_here' );
    
    /** MySQL database username */
    define( 'DB_USER', 'username_here' );
    
    /** MySQL database password */
    define( 'DB_PASSWORD', 'password_here' );
    
    /** MySQL hostname */
    
    define( 'DB_HOST', 'localhost' );
    
    /** Database Charset to use in creating database tables. */
    define( 'DB_CHARSET', 'utf8' );
    
    /** The Database Collate type. Don't change this if in doubt. */
    define( 'DB_COLLATE', '' );
    
    define('FS_METHOD','direct');
    define("FTP_HOST", "localhost");
    define("FTP_USER", "admin");
    define("FTP_PASS", "1234");
    
    /**#@+
     * Authentication Unique Keys and Salts.
     *
     * Change these to different unique phrases!
     * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
     * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
     *
     * @since 2.6.0
     */
    define( 'AUTH_KEY',         'put your unique phrase here' );
    define( 'SECURE_AUTH_KEY',  'put your unique phrase here' );
    define( 'LOGGED_IN_KEY',    'put your unique phrase here' );
    define( 'NONCE_KEY',        'put your unique phrase here' );
    define( 'AUTH_SALT',        'put your unique phrase here' );
    define( 'SECURE_AUTH_SALT', 'put your unique phrase here' );
    define( 'LOGGED_IN_SALT',   'put your unique phrase here' );
    define( 'NONCE_SALT',       'put your unique phrase here' );
    
    /**#@-*/
    
    /**
     * WordPress Database Table prefix.
     *
     * You can have multiple installations in one database if you give each
     * a unique prefix. Only numbers, letters, and underscores please!
     */
    $table_prefix = 'wp_';
    
    /**
     * For developers: WordPress debugging mode.
     *
     * Change this to true to enable the display of notices during development.
     * It is strongly recommended that plugin and theme developers use WP_DEBUG
     * in their development environments.
     *
     * For information on other constants that can be used for debugging,
     * visit the Codex.
     *
     * @link https://codex.wordpress.org/Debugging_in_WordPress
     */
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_DISPLAY', true);
    define( 'WP_DEBUG_LOG', true );
    define( 'SCRIPT_DEBUG', true );
    
    /* That's all, stop editing! Happy publishing. */
    
    /** Absolute path to the WordPress directory. */
    if ( ! defined( 'ABSPATH' ) ) {
    	define( 'ABSPATH', dirname( __FILE__ ) . '/' );
    }
    
    /** Sets up WordPress vars and included files. */
    require_once( ABSPATH . 'wp-settings.php' );
    • Diese Antwort wurde geändert vor 3 Jahren, 5 Monaten von Bego Mario Garde. Grund: Code-Formatierung korrigiert
    Thread-Starter philipp2208

    (@philipp2208)

    Ja, „there has been a critical error on your website“.

    Thread-Starter philipp2208

    (@philipp2208)

    ok. habe ich gemacht, allerdings bleibt die debug.log Datei leer auch wenn ich die Seite neu lade.

    Thread-Starter philipp2208

    (@philipp2208)

    danke für die Nachricht, leider nein… Bei mir sind die ganzen „define“ Definitionen in der wp-config-sample Datei, deshalb habe ich das dort dazu geschrieben. Ich habe in Ubuntu noch eine Datei in einem anderen Ordner, die config-localhost.php Datei. Muss ich das evtl .dort rein schreiben?

    Thread-Starter philipp2208

    (@philipp2208)

    Thread gelöst

    Thread-Starter philipp2208

    (@philipp2208)

    ich mach das mit Ubuntu und LAMPP heißt das dann glaube ich. Danke für den Tip, werde das mal versuchen!

    Thread-Starter philipp2208

    (@philipp2208)

    Ich kann mal kurz die Seite frei schalten ok.?
    Erreichen möchte ich, dass auf der Services Pages drei neue Felder auftauchen, die gleich aussehen als auf der Startseite aber mit anderen Seiten verlinkt sind. Also dann mit den entsprechenden ServiceSeiten. Vielleicht hats Du eine Idee…

    Thread-Starter philipp2208

    (@philipp2208)

    Ok, danke erstmal, wahrscheinlich muss ich da noch ein bisschen tiefer in PHP einsteigen um das dann richtig zuzuweisen. In dem Code oben wird ja irgendwie ein bestimmter Wert oder die Adresse einer Seite, also z.B. die Adresse von Seite eins an die Variable $page_one übergeben. Frage wäre jetzt ob es nicht auch möglich ist eine andere als die durch das Theme automatisch erstellte giving_press_lite_page_one direkt an $page_one zuzuweisen.

    Forum: Allgemeine Fragen
    Als Antwort auf: WordPress Editor
    Thread-Starter philipp2208

    (@philipp2208)

    Alles klar, danke Dir!

    Forum: Allgemeine Fragen
    Als Antwort auf: WordPress Editor
    Thread-Starter philipp2208

    (@philipp2208)

    Ich mache ein VideoTutorial: WordPress 101 auf YouTube

    dort wird z.B. in die functions.php eine Funktion wp_irgendwas… geschrieben. Eigentlich würde ich vermuten, dass beim WordPress Editor sobald ich wp innerhalp einer Funktion eingebe, mir angezeigt wird, was es bereits für vordefinierte Funktionen es gibt. Also z.B

    wp_enqueue_media
    wp_enqueue_script

    mit den entsprechenden Argumenten.
    Bei mir wird das nicht angezeigt…

    Thread-Starter philipp2208

    (@philipp2208)

    alles klar!

    Thread-Starter philipp2208

    (@philipp2208)

    Nachdem ich die Seite jetzt nochmal neu geladen habe, hat es funktioniert. War also doch der Cache…

    Danke für die Hinweise!

    Thread-Starter philipp2208

    (@philipp2208)

    Danke auf jeden Fall erstmal für die Mühe. Ich hab

    #site-info {
    height: 10px;
    }

    in den Editor eingefügt aber es hat sich bei mir nichts verändert. Vielleicht doch irgendwas mit dem Cache?

    Ich würde nur gerne verstehen, warum das jetzt mit Additional CSS funktioniert aber nicht mit dem Editor… das ist meine konkrete Frage. Also es zieht und drückt nicht überall.

Ansicht von 15 Antworten - 31 bis 45 (von insgesamt 52)