WordPress.org

Ready to get started?Download WordPress

Forums

Only title and meta for all archives, cats, tags (3 posts)

  1. dragonsjaw
    Member
    Posted 1 year ago #

    I am using a child theme of Twenty Twelve.

    I am trying to get all archives, categories, tags, search, monthly results to show only TITLE and entry META.

    I did find this (haven't tried it as I don't want excerpts.

    this thread.

    I did try this which partially worked for Categories only.

    Any help will be appreciated.

  2. dragonsjaw
    Member
    Posted 1 year ago #

    Still working on this:
    I have used the code Esmi provided in my child content.php:

    <?php if ( is_search() ) : // Only display Excerpts for Search ?>
    <div class="entry-summary">
    <?php the_excerpt(); ?>
    </div><!-- .entry-summary -->
    <?php elseif( !is_category() ) : ?>
    <div class="entry-content">
    <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?>
    <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
    </div><!-- .entry-content -->
    <?php endif; ?>

    And this does then create the Category page with just Title and Meta (date) data, which is what I want.

    I have tried numerous ways to add is_tag and is_archive to the elseif statement with no luck.

    Could really use some help on this one. Seem so simple yet nothing works.

    I just want post Title and meta data to be returned - no content or excerpt.

    Thanks

  3. dragonsjaw
    Member
    Posted 1 year ago #

    Still haven't gotten this the way I want it.

    <?php if ( is_search() || is_archive() ) : // Only display Excerpts for Search  and all Archives ?>
    <div class="entry-summary">
    <?php the_excerpt(); ?>
    </div><!-- .entry-summary -->
    <?php elseif( !is_category() ) : ?>
    <div class="entry-content">
    <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
    <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
    </div><!-- .entry-content -->
    <?php endif; ?>

    By adding is_archives to the if statement .. then everything but the permalink shows excerpts.

    So Is there a way to have the category, tags, and search returns only show the title and meta data???

Topic Closed

This topic has been closed to new replies.

About this Topic