- Statut : non résolu
- Ce sujet contient 4 réponses, 3 participants et a été mis à jour pour la dernière fois par
elo07, le il y a 10 années.
-
AuteurMessages
-
16 octobre 2014 à 13 h 24 min #543117
Bonjour,
Ma configuration WP actuelle
– Version de WordPress : 4.0
– Version de PHP/MySQL : ne sais pas où trouver l’iinfo
– Thème utilisé : orange-child
– Extensions en place : gallery
– Nom de l’hebergeur : 1&1
– Adresse du site : http://test2014.apps-1and1.netProblème(s) rencontré(s) :
je souhaite supprimer l’affichage de l’auteur, mais laissé la date sur les articles du sitevoici le code de archive.php
<?php get_header(); ?>
<?php
if (function_exists('orange_breadcrumb'))
orange_breadcrumb();
?>
<section class="eleven columns" id="content">
<?php if (is_day()) : ?>
<h1><?php printf(__('Daily Archives: <span>%s</span>‘, ‘orange’), get_the_date()); ?></h1>
<?php elseif (is_month()) : ?>
<h1><?php printf(__('Monthly Archives: <span>%s</span>‘, ‘orange’), get_the_date(‘F Y’)); ?></h1>
<?php elseif (is_year()) : ?>
<h1><?php printf(__('Yearly Archives: <span>%s</span>‘, ‘orange’), get_the_date(‘Y’)); ?></h1>
<?php elseif (is_category()) : ?>
<h1><?php printf(__('', 'orange'), single_cat_title('', false)); ?></h1>
<?php
if (category_description())
echo category_description();
?>
<?php elseif (is_tag()) : ?>
<h1><?php printf(__('Tag Archives: <span>%s</span>‘, ‘orange’), single_tag_title( », false)); ?></h1>
<?php
if (tag_description())
echo tag_description();
?>
<?php elseif ( is_tax() ) : ?>
<h1><?php single_term_title(); ?></h1>
<?php echo term_description('', get_query_var('taxonomy')); ?>
<?php elseif ( is_author() ) : ?>
<?php $user_id = get_query_var('author'); ?>
<div id="author-info" class="vcard">
<h1 class="fn n"><?php the_author_meta('display_name', $user_id); ?></h1>
<?php
if ( get_the_author_meta( 'description', $user_id ) ) : ?>
<?php echo get_avatar(get_the_author_meta('user_email', $user_id)); ?>
<p>
<?php the_author_meta('description', $user_id); ?>
</p>
<?php endif; ?>
</div>
<?php elseif ( is_post_type_archive() ) : ?>
<h1><?php post_type_archive_title(); ?></h1>
<?php elseif ( is_archive() ) : ?>
<h1><?php _e('Archives', 'orange'); ?></h1>
<?php endif; ?>
<?php
if (have_posts()) :
while (have_posts()) : the_post();
get_template_part('loop', get_post_format());
endwhile; else :
get_template_part('loop', 'none');
endif;
?>
</section>
<?php get_sidebar(); ?>
<?php
if (function_exists('wp_pagenavi')) { wp_pagenavi();
} else { orange_pagination();
}
?>
<?php get_footer(); ?>Le problème est que je ne sais pas quoi supprimer ou modifier pour supprimer « by nom-d-auteur » en haut des articles. (cf menu college->actualités)
merci d’avance à ceux qui pourront prendre le temps de m’aider…
16 octobre 2014 à 15 h 41 min #977651ça ne se trouve pas dans ce fichier mais dans les fichiers dont le nom commence par « loop’
17 octobre 2014 à 13 h 21 min #977652bonjour,
merci pour la réponse, mais même en regardant les différents fichiers loop… .PHP, je ne trouve aucune ligne « author » ou « by author » …:oops:voilà ce que j’ai :
loop.PHP :
<article >
<?php
if (comments_open()) :
comments_popup_link(__(‘0’, ‘orange’), __(‘1’, ‘orange’), __(‘% ‘, ‘orange’), ‘comments-link’, __(‘Comments are off for this post’, ‘orange’));
endif;
?><a href=" » title= » » rel= »bookmark »>
<?php
if (!empty($post -> post_excerpt))
echo ‘‘ . get_the_excerpt() . ‘‘;
?><a href=" » title= » »>
<?php
if (has_post_thumbnail()) {
the_post_thumbnail(‘thumbnail’, array(‘class’ => ‘alignleft’));
}
?>‘
‘ . __(‘Pages:’, ‘orange’), ‘after’ => ‘
‘)); ?>
loop-slide.PHP :
<?php $sticky = get_option('sticky_posts');
if($sticky) : ?>-
<?php
-
<a href=" » title= » » rel= »bookmark »>
<?php
if (has_post_thumbnail()) : the_post_thumbnail(‘thumbnail’, array(‘class’ => ‘alignleft’));
endif;
?>‘
‘ . __(‘Pages:‘, ‘orange’), ‘after’ => ‘‘)); ?>
$args = array(
‘posts_per_page’ => -1,
‘post__in’ => get_option( ‘sticky_posts’ ),
‘ignore_sticky_posts’ => 1
);
$the_query = new WP_Query( $args );
while ( $the_query->have_posts() ) : $the_query->the_post();
?>loop-quote.PHP :
<article >
<?php
if (comments_open()) :
comments_popup_link(__(‘0’, ‘orange’), __(‘1’, ‘orange’), __(‘% ‘, ‘orange’), ‘comments-link’, __(‘Comments are off for this post’, ‘orange’));
endif;
?><a class="alignright" href=" »> loop-none.PHP :
loop-image.PHP :
<article >
<a href=" » title= » »> <?php
if (has_post_thumbnail()) {
the_post_thumbnail(‘large’);
}
?><?php
if (comments_open()) :
comments_popup_link(__(‘0’, ‘orange’), __(‘1’, ‘orange’), __(‘% ‘, ‘orange’), ‘comments-link’, __(‘Comments are off for this post’, ‘orange’));
endif;
?><a class="alignright" href=" »>
loop-gallery.PHP :
<article >
<a href=" » title= » »> <?php
if (has_post_thumbnail()) {
the_post_thumbnail(‘large’);
}
?><?php
if (comments_open()) :
comments_popup_link(__(‘0’, ‘orange’), __(‘1’, ‘orange’), __(‘% ‘, ‘orange’), ‘comments-link’, __(‘Comments are off for this post’, ‘orange’));
endif;
?><a class="alignright" href=" »>
loop-aside.PHP :
<article >
<?php
if (comments_open()) :
comments_popup_link(__(‘0’, ‘orange’), __(‘1’, ‘orange’), __(‘% ‘, ‘orange’), ‘comments-link’, __(‘Comments are off for this post’, ‘orange’));
endif;
?><a class="alignright" href=" »> :boulet:
17 octobre 2014 à 13 h 55 min #977653Bonjour.
En fait, c’est pas courant mais c’est functions.php à la ligne 182
$format_text = __(‘<p><a href="%1$s" title="%2$s" rel="bookmark"> %4$s </a> <em>by</em> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s </a></span></p>‘, ‘orange’);
}Il faut supprimer
<em>by</em> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s </a></span>
Cordialement
9 juillet 2015 à 14 h 53 min #977654pardon PhiLyon pour la réponse tardive…
j’ai pas reçu de mail de notification… 😳Mille mercis pour ton aide précieuse !!! 🍺
ça a fonctionné à merveille
✅ -
-
AuteurMessages
- Vous devez être connecté pour répondre à ce sujet.