Ondersteuning » Thema en CSS/opmaak » stylesheet aanpassen in superskeleton theme

  • Opgelost kuylenburg

    (@kuylenburg)


    Beste lezer,

    Ik wil graag wijzigingen aanbrengen in bijvoorbeeld lettertype, size, color etc. Bij mij oude twenty ten thema deed is dat in de dashboard>bewerker en dan stylesheet. Ik heb nu een nieuw thema genaamd superskeleton. Dit thema heeft een apart stylesheet voor zogenaamde typografische wijzigingen. Deze kan ik alleen niet terug vinden vanuit het dashboard. Ik vind het wel in een map uit het orginele zip.bestand wat ik geupload heb om dit thema te installeren. Nu is mijn vraag de volgende; hoe pas ik nu de wijzigingen toe? Pas ik dit bestand aan en load ik dat opnieuw op via ftp? Moet ik het bestand vanuit mijn dashboard wijzigen, en hoe? Of moet ik iets heel anders doen wellicht?

    Ik hoop dat u mij kunt helpen? Als er meer info benodigd is hoor ik het graag.

    Gr. René

3 reacties aan het bekijken - 1 tot 3 (van in totaal 3)
  • Downloaden via FTP (of rechtstreeks bewerken) en weer uploaden.

    Backup maken is wel aan te raden.

    Thread starter kuylenburg

    (@kuylenburg)

    dank je

    Zien jullie misschien ook iets mis met deze code? Ik probeer style en script bestanden te registreren binnen een plugin. Er is een print_r en/of echo op uit te voeren na de registratie, dus de syntax iig klopt. Maar ik krijg ze niet terug te zien. Ik ben nog vrij nieuw aan het WP programmeren en al helemaal wat plugins aan gaat.

    function load_script_files(){
    	$pluginURL = plugin_root();
    
    	//CASCADING STYLE SHEETS
    	//make an array of stylesheets to be added automatically on admin dashboard load
    	$styleArray[] = array( 'handle' => 'dummy', 'src' => $pluginURL . '', 'path' => WP_PLUGIN_DIR ); //unknown why, first add_action does not work using foreach
    	$styleArray[] = array( 'handle' => 'maxe_dashboard_css', 	'src' => $pluginURL . 'php/maxe_dashboard.css',			'path' => WP_PLUGIN_DIR . '/max-event/php/maxe_dashboard.css' );
    	$styleArray[] = array( 'handle' => 'maxe_page_calender_css', 		'src' => $pluginURL . 'php/maxe_page_calender.css',		'path' => WP_PLUGIN_DIR . '/max-event/php/maxe_page_calender.css' );
    	$styleArray[] = array( 'handle' => 'maxe_widget_css', 		'src' => $pluginURL . 'widget/maxe_widget.css', 	'path' => WP_PLUGIN_DIR . '/max-event/widget/maxe_widget.css' );
    
    	//loop through stylesheet array to create and call action to have them added, one at a time
    	foreach( $styleArray as $style ){
    		do_action( 'wp_print_styles', $style );
    		add_action( 'wp_print_styles', 'add_stylesheet', 10, $style );
    	}
    }
    
    //add stylesheets to the page to be loaded, $style to consist of: $handle, $src, $path
    function add_stylesheet( $style ){
    	$src = 		$style[ 'src' ];
    	$handle = 	$style[ 'handle' ];
    	$path = 	$style[ 'path' ];
    	printr($style);
    	//check if the file path exists, then register the file and add to list to be generated
    	if( file_exists( $path )){
    		wp_deregister_style( $handle );
    		wp_register_style( $handle, $src );
    		wp_enqueue_style( $handle );
    	}
    }

    Resultaat (URL’s kloppen):
    Array
    (
    [handle] => maxe_page_calender_css
    [src] => http://URL/wp-content/plugins/max-event/php/maxe_page_calender.css
    [path] => /URL/wp-content/plugins/max-event/php/maxe_page_calender.css
    )

    Tevens is er het gekke probleem dat in de foreach bij de eerste array waarde, [0], de registratie functie niet wordt aangeroepen.

    Veel meer dan dit wordt er nog niet gedaan door de plugin.

    Alvast bedankt voor de hulp!!!
    Nukeface

3 reacties aan het bekijken - 1 tot 3 (van in totaal 3)
  • Het onderwerp ‘stylesheet aanpassen in superskeleton theme’ is gesloten voor nieuwe reacties.