Oi usando Função Referência / remover ação e usando Referência de função / remove filtro . Usando essas duas funções, só podemos ignorar as funções.
Eu criei filho do tema vinte e cinco. Tentei substituir a função escrita abaixo
/**
* Returns a "Continue Reading" link for excerpts
*
* @since Twenty Ten 1.0
* @return string "Continue Reading" link
*/
function twentyten_continue_reading_link() {
return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) . '</a>';
}
/**
* Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyten_continue_reading_link().
*
* To override this in a child theme, remove the filter and add your own
* function tied to the excerpt_more filter hook.
*
* @since Twenty Ten 1.0
* @return string An ellipsis
*/
function twentyten_auto_excerpt_more( $more ) {
return ' …' . twentyten_continue_reading_link();
}
add_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' );
Ele diz para substituir isso em um tema filho, remover o filtro e adicionar sua própria função vinculada ao gancho de filtro excerpt_more. Eu não quero fazer nenhuma alteração na pasta do tema pai, então criei functions.php na pasta do tema filho. Eu escrevo minha função no arquivo filho functions.php como abaixo
f
function twentyten_continue_reading_link_() {
return ' <a href="'. get_permalink() . '">' . __( 'READ MORE', 'twentyten' ) . '</a>';
}
function twentyten_auto_excerpt_more_( $more ) {
return ' …' . twentyten_continue_reading_link_();
}
add_filter( 'excerpt_more', 'twentyten_auto_excerpt_more_' );
Mas eu tenho que comentar o filtro escrito no pai para fazer o novo trabalho. É possível fazer sem modificar o arquivo principal functions.php.
Qualquer ajuda será apreciada. Agradecemos antecipadamente
Oi usando Função Referência / remover ação e usando Referência de função / remove filtro . Usando essas duas funções, só podemos ignorar as funções.