Où se trouve le fichier get_header ('shop') dans les modèles Woocommerce
2 réponses
- votes
-
- 2013-09-06
get_header( $name )
est unefonction Wordpress,quiessaiera de charger lefichierheader-{$name}.php
depuis le dossier racine de votrethème.Si cefichiern'existepas,Wordpress chargera lefichierheader.php
par défaut.get_header( $name )
is a Wordpress function, that will try to load the fileheader-{$name}.php
from your theme's root folder. If this file doesn't exist, Wordpress will load the defaultheader.php
file.-
Merci d'avoir répondu.Je vais doncessayer detéléchargermapropre version de header-shop.phpet voir si cela résout leproblème.Merci.Thanks for the answer. So I'll try to upload my own version of header-shop.php and see if that solves it. Thanks.
- 1
- 2013-09-06
- Joe R.
-
Quelestexactement votreproblème?What is exactly your problem?
- 0
- 2013-09-06
- cybmeta
-
Monproblèmeest que sur lespages régulières demonthème,il affiche unen-tête H1 àpartir dutitre de lapage,mais sur lespagesproduit,il sembletirer dumême header.phpet non d'en-tête-shop.php (car celane lefaitpas ''texistent)mais quandje regarde dans le header.phpiln'y a aucune référence à labalise d'en-tête deproduit unique qui devrait logiquement lefaire agir différemmentMy problem is that on the regular pages of my theme, it displays an H1 header from the page title, but on the Product Pages it seems to be pulling from the same header.php and not header-shop.php (because that doesn't exist) but when I look in the header.php there is no reference to the single-product header tag that should logically make it act differently
- 0
- 2013-09-06
- Joe R.
-
Jepense que vous cherchez dans lemauvaisfichier;Je soupçonne que vous devriez regarder dans lemodèle deproduit uniqueet non dans unmodèle d'en-tête.I think you are looking in the wrong file; I suspect that you should look into the single product template and not in any header template.
- 0
- 2013-09-06
- cybmeta
-
`if ((is_tax () &&taxonomy_exists ('product_cat') && $ current_tax=="product_cat ")|| is_singular ('product')) { écho ''; }elseif (((is_home ()|| is_page ()|| is_single ()) &&intval (get_post_meta ($post_id,'title-show',true))==0) &&!is_front_page ()) {?>' .get_the_title ($post_id). ''; ``if((is_tax() && taxonomy_exists('product_cat') && $current_tax == "product_cat") || is_singular('product')) { echo ''; } elseif (((is_home()|| is_page() || is_single()) && intval(get_post_meta($post_id , 'title-show', true)) == 0) && !is_front_page()) { ?>'.get_the_title($post_id).'';`
- 0
- 2013-09-06
- Joe R.
Jepense quemonproblèmeest de savoir où setrouve l'écho de lataxonomie duproduit '',mais si ce sontmes autrespages,je peux lemanipulerpour qu'il soit un H1.I think my problem is where it's the product taxonomy it show's echo '' but if it's my other pages I can manipulate it to be an H1.- 0
- 2013-09-06
- Joe R.
Jepense queje me rapproche,mercipour lapatience,où setrouverait «woocommerce_before_single_product»?I think I'm getting closer, thanks for the patience, where would 'woocommerce_before_single_product' be located?- 0
- 2013-09-06
- Joe R.
do_action ('woocommerce_before_single_product');do_action( 'woocommerce_before_single_product' );- 0
- 2013-09-06
- Joe R.
Si votreproblèmeest différent de votre questioninitiale,vous commencez une autre question carilest vraiment difficile de répondre dans les commentaires.If your problem is diferent to your original question you start another question because it is really difficult answer in the comments.- 0
- 2013-09-06
- cybmeta
- 2013-09-06
get_header()
est unefonction WordPress (pas un WooCommercespécifique)et s'ilestpassé,unparamètre doit charger unfichiernomméheader-<parameter>.php
àpartir de la racine duthème (ou de la racine duthèmeparent).Il devrait donc y avoir unfichiernomméheader-shop.php
dans lemême répertoire queheader.php
oufooter.php
.get_header()
is a WordPress function (not a WooCommerce specific one) and if passed a parameter should load a file namedheader-<parameter>.php
from the theme root (or parent theme root). So there should be a file namedheader-shop.php
in the same directory asheader.php
orfooter.php
.-
Okmercipour l'information -j'ai cherchépartout cetteinformation dans lesfichiers dethèmemaiselle semblemanquer.Si cefichiern'existepas,puis-je le créermoi-mêmeet sera-t-ilextrait de celui queje crée?Ok thanks for the information - I've looked everywhere for that info in the theme files but it seems to be missing. If that file doesn't exist can I create it myself and will it pull from the one I create?
- 0
- 2013-09-06
- Joe R.
-
Non,j'utilisejuste lethème standard 'Alterna' de Themeforest,pas dethèmeenfantNo I'm just using the standard 'Alterna' theme from Themeforest, no child theme of it
- 0
- 2013-09-06
- Joe R.
-
Ummm ... vous êtespréoccupépar les "modèles Woocommerce"et utilisez unthème de ThemeForest donc ... quelleest la connexion?Ummm... you are concerned about "Woocommerce templates" and are using a theme from ThemeForest so... what is the connection?
- 0
- 2013-09-06
- s_ha_dum
-
Ohh ... lethème quej'utilise contient desfichiers woocommercemodifiés qui remplacent lesfichiers woocommerce standard -est-ce que cela a du sens?Jem'occupe de cesfichiers woocommercepersonnalisés duthèmeOhh...the theme I'm using has some modified woocommerce files that overrides the standard woocommerce files - does that make sense? I'm dealing with those custom woocommerce files from the theme
- 0
- 2013-09-06
- Joe R.
-
Votrethèmeest donc unenfant?So your theme is a child?
- 0
- 2013-09-06
- s_ha_dum
-
Ouije suppose que dans ce sens c'est,désolépour la confusion :)Comment afficher lefichier contenant 'woocommerce_before_single_product' de `do_action ('woocommerce_before_single_product');`?Yes I suppose in that sense it is, sorry for the confusion :). How would I view the file that contains 'woocommerce_before_single_product' from `do_action( 'woocommerce_before_single_product' );`?
- 0
- 2013-09-06
- Joe R.
J'aibesoin demodifier lefichier get_header ('shop') dans Woocommercemaisje ne saispas oùil setrouve,si quelqu'un le sait,aidez-moi,merci!