Ich benutze die folgenden Codes, um Posts only aus dem ' image ' Post-Format zu erhalten und es funktioniert.
<?php if( has_post_format('image')){ ?>
<?php the_post_thumbnail(); ?>
<?php } ?>
Ich muss auch Posts only von ' standard ' im Post-Format mit den folgenden Codes abrufen, aber sie werden von allen Post-Formaten abgerufen.
<?php if( has_post_format('standard')){ ?>
<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
<?php } ?>
Irgendwelche Lösungen?
Tun,
<?php if( false == get_post_format() ){ ?>
<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
<?php } ?>
Das Standard-Post-Format ist eigentlich kein Post-Format. Wenn Sie also unter bestimmten Bedingungen prüfen, ob ein Post ein anderes Post-Format als den Standard-Standard enthält, wird false
zurückgegeben, da es auf ... standard festgelegt ist.