2016-10-22 1 views

Répondre

0

Ce code de genèse qui ferment l'en-tête

add_action('genesis_entry_header', 'genesis_entry_header_markup_close', 15); 
/** 
* Echo the closing structural markup for the entry header. 
* 
* @since 2.0.0 
*/ 
function genesis_entry_header_markup_close() { 
    echo '</header>'; 
} 

La priorité est de 15 et que la raison pour laquelle la priorité pour le mon code doit être plus

add_action('genesis_entry_header', 'add_stuff_after_title', 100); 
function add_stuff_after_title() { 
    if(is_singular('post')) { 
     _e("<span>This is before the ending header tag.</span>"); 
    } 
} 
0

Utilisez l'action genesis_entry_header. Cela vous permet d'injecter du contenu dans la fin de l'en-tête.

add_action('genesis_entry_header', 'add_stuff_after_title', 12); 
function add_stuff_after_title() { 
    if(is_singular('post')) { 
     _e("<span>This is before the ending header tag.</span>"); 
    } 
} 
+0

je change le $ priorité à 100 et le code fonctionne parfaitement – lvillarino