<?php while (have_posts()) : the_post(); ?>
<section class="panel panel-white">
<div class="row single-post-content">
<?php if ($category_name !== 'Jobs') { ?>
<h5 class="author-post__title"><?php the_author() ?></h5>
<p><?php echo get_the_date(); ?></p>
<?php }
the_content();
if ($category_name !== 'Jobs') { ?>
<div class="row author-post">
<div class="small-12 medium-4 column">
<img src="<?php echo get_avatar(); ?>" alt="" />
</div>
<div class="small-12 medium-8 column">
<h5 class="author-post__title"><?php the_author() ?></h5>
<p>
Lorem Ipsum has been the industry's standard dummy text
ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen
book. It has survived not only five centuries, but
also the leap into electronic typesetting, remaining
essentially unchanged. It was popularised in the 1960s
with the release of Letraset sheets containing.
</p>
</div>
</div>
<?php } ?>
</div>
</section>
<?php endwhile;?>
Ich versuche, durch den Avatar des Autors, der den Beitrag geschrieben hat ziehen. Ich dachte, das würde funktionieren, aber es scheint nicht die richtige URL auszugeben und gibt mir eine 404 auf dem Bild.Wordpress - Get Autor Bild
Welche Methoden haben andere Leute benutzt, um das Avatarbild durchzuziehen?
Ich bin auf der Suche nach einer Antwort, die mir sagt, wie man das macht und ob es kein Bild gibt, das man nicht zeigt.
UPDATE:
Ich habe versucht, diese Arbeit mit dem folgenden Code zu machen: Ich soll erwähnen, dass ich auch diese Arbeit auf meinem lokalen Rechner zu machen versuchen.
echo get_avatar($authorId, 100);
(Die Variable verwendet get_the_author_id()
)
Ich habe ein Update auf meine Frage –