WordPress.org

Ready to get started?Download WordPress

Forums

hook_Template_css per page? (1 post)

  1. Baudry
    Member
    Posted 6 years ago #

    Hello today i try to make this to encapsutate function for
    ask css when i activate my page named home :
    First i make that ?

    1.
          <?php
       2.
          // Home Css attribution
       3.
          // Definition creation de fonction attributions de css par page
       4.
          // Version test
       5.
          // Author Olivier Baudry
          //olivierbaudry.eba@hotmail.fr
       6.
    
       7.
          function php_template_home ($hook,$vars) {
       8.
    
       9.
    
      10.
              // intialise les css pour ma page home
      11.
             global $thèmehome;
      12.
             switch ($hook){
      13.
             //thème home appele à chaque fois qu'on est sur 'home'
      14.
             case 'home':
      15.
             theme_add_style  (TEMPLATEPATH ('thème,$thèmehome). '/stylehome.css);
      16.
             theme_add_style   (TEMPLATEPATH ('thème,$thèmehome). '/common.css);
      17.
             theme_add_style   (TEMPLATEPATH ('thème,$thèmehome). '/menusite.css);
      18.
             break;
      19.
    
      20.
             }
      21.
             return $vars;
      22.
             }

    And after is it possible to debug this for show me how to

    <?php
    // Home Css attribution
    // Definition creation de fonction attributions de css par page
    // Version test
    // Autor Olivier Baudry
    
    function php_template_home ($hook,$vars) {
    
    	  // intialise les css pour ma page home
    	 global $thèmehome;
    	 switch ($hook){
    	 //thème home appele à chaque fois qu'on est sur 'home'
    	 case 'home':
    	 <?echo get_template_directory_uri('thème,$thèmehome);?>. '/stylehome.css);
    	 <?echo get_template_directory_uri('thème,$thèmehome);?>. '/common.css);
    	 <?echo get_template_directory_uri('thème,$thèmehome);?>. '/menusite.css);
    	 break;
    
    	 }
    	 return $vars;
    	 }

    If anyone have a solution for ask main css per page, I would'like to see it!
    Thanks for anyone who read me and send me response.
    olivierbaudry.eba@hotmail.fr

Topic Closed

This topic has been closed to new replies.

About this Topic