Category: WordPress

  • WordPress theme with Bootstrap

    An excellent tutorial by Zac Gordon: “How to Build a Responsive WordPress Theme with Bootstrap”.  You’ll learn to hack a WP theme from scratch with Bootstrap and jQuery enabled.

  • WordPress – opsætning på EAL

    PhpMyadmin: http://phpmyadmin.mmd.eal.dk/ brugerid: domænenavn password: ******* databaseNavn (domæne med underscores) Eksempel Bruger: xxxx.mmd.eal.dk Password: ********* Database: xxxx_mmd_eal_dk Filen wp-config.php kommer til at se sådan ud: // ** MySQL settings – You can get this info from your web host ** // /** The name of the database for WordPress */ define(‘DB_NAME’, ‘xxxx_mmd_eal_dk’); /** MySQL database username…

  • Plugin CSS i WordPress

    Efter en række eksperimenter har jeg fundet denne opskrift, der hooker et stylesheet rigtigt ind i WP dashboard. Virker både for admin og øvrige registrerede brugere: add_action( 'admin_enqueue_scripts', 'safely_add_stylesheet_to_admin' ); /** * Add stylesheet to the page */ function safely_add_stylesheet_to_admin() { wp_enqueue_style( 'prefix-style', plugins_url('style_admin.css', __FILE__) ); }

  • CSS i plugin

    Dokumentationen på Codex er ikke lysende klar; men et plugin gør sådan: /* filters etc. */ add_action('wp_print_styles', 'add_hyperboard_stylesheet'); // (…) /*Required stylesheets */ function add_hyperboard_stylesheet() { $myStyleUrl = WP_PLUGIN_URL . '/hyperboard/styles.css'; $myStyleFile = WP_PLUGIN_DIR . '/hyperboard/styles.css'; if ( file_exists($myStyleFile) ) { wp_register_style('HyperBoardStyleSheets', $myStyleUrl); wp_enqueue_style( 'HyperBoardStyleSheets'); } } Pluginet sætter en krog i wp_print_styles.

  • Sådan: $wpdb->update / insert

    $wpdb klassen bruges sådan (se Codex her): $wpdb->update( "KbnProjects", // tabellen array('Name' => 'Værdi'), // opdateringsfeltet array('ID' => 0) // Id ); Insert fungerer i øvrigt på en lignende måde: $wpdb->insert( 'table', array( 'column1' => 'value1', 'column2' => 123 ), array( '%s', // streng '%d' // tal ) ); Codex forklarer desværre ikke, hvordan et…

Enable Notifications OK No thanks

We use cookies - more information

Multimusen.dk will set a few cookies from Doubleclick, Google and the Social Media plugins they ay set some cookies. Some of my pages use APIs - such as YouTube, LinkedIn, Google Fonts, Google Maps, Mapbox, Spotify, Jetpack, Twitter, Facebook &c.. Such plugins may set the odd cookie.

Close