Mai 27, 2010

Conditional tags in WordPress

Filed under: Hacking — Schlagwörter: — paddy @ 3:16 am

You would like to know what type of page you are on? A list view or single view? Conditional Tags

<?php if (!empty($post->post_excerpt) &! is_single()) : ?>
        <?php the_excerpt(); ?>
        <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">Read the full post »</a></p>
<?php else : ?>
        <?php the_content(__('(more...)')); ?>
<?php endif; ?>

Weblinks

Keine Kommentare »

Noch keine Kommentare

RSS Feed für Kommentare zu diesem Artikel. TrackBack URL

Hinterlasse einen Kommentar

Creative Commons License Dieser Werk bzw. Inhalt ist unter einer Creative Commons-Lizenz lizenziert.
Powered by WordPress