wordpress_ancre_commentaires_articles
Ceci est une ancienne révision du document !
Comment aller directement sur le formulaire de commentaire depuis un article sous Wordpress ?
On modifie le fichier single.php (article seul) du template courant.
Et on y insere le code qui va bien, voir cette exemple :
<?php
/**
*
* single.php
*
* The single post template. Used when a single post is queried.
*
*/
get_header();
?>
<html>
<body>
<!-------------- insertion d'une ancre defilement vers le bas de la page -------------------->
<a class="bouton" href="#comment">Venez commenter cet article!</a>
</body>
</html>
<?php get_sidebar('top'); ?>
<?php
if (have_posts()) {
/* Display navigation to next/previous posts when applicable */
if (theme_get_option('theme_top_single_navigation')) {
theme_post_navigation(
array(
'prev_link' => theme_get_previous_post_link('« %link'),
'next_link' => theme_get_next_post_link('%link »')
)
);
}
while (have_posts()) {
the_post();
get_template_part('content', 'single');
}
/* Display navigation to next/previous posts when applicable */
if (theme_get_option('theme_bottom_single_navigation')) {
theme_post_navigation(
array(
'prev_link' => theme_get_previous_post_link('« %link'),
'next_link' => theme_get_next_post_link('%link »')
)
);
}
} else {
theme_404_content();
}
?>
<?php get_sidebar('bottom'); ?>
<?php get_footer(); ?>
wordpress_ancre_commentaires_articles.1493899480.txt.gz · Dernière modification : (modification externe)
