WordPress.org

Ready to get started?Download WordPress

Forums

How to show images in category, archive and tag template (5 posts)

  1. Martin
    Member
    Posted 3 years ago #

    Hi.

    How can i enable images in template fils: category.php, archive.php and tag.php, they doo't want to show.

    They are showing when i clik home - index.php

    How can i fix this problem?

    Thanx

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    theme?

    link to your site?

    the category.php, archive.php and tag.php might have the_excerpt() in their code isntead of the_content()

    http://codex.wordpress.org/Function_Reference/the_excerpt

  3. Martin
    Member
    Posted 3 years ago #

    I'm using "Twenty Ten 1.1 by the WordPress team" theme, on ma computer.

    If you like, i can put it to the live server.

    I'm new to coding and i don't know how to use http://codex.wordpress.org/Function_Reference/the_excerpt

    Thanx for help.

  4. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    for twenty ten, the code is in loop.php;

    edit loop.php, and find this line (it occurs twice in loop.php - change both occurrences):

    <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>

    change it to:

    <?php if ( is_search() ) : // Only display excerpts for search. ?>

    this will then leave the excerpts (which are without images and formatting) just for the search results.

  5. Martin
    Member
    Posted 3 years ago #

    It works!

    Thanx and have a nice day!

    Martin

Topic Closed

This topic has been closed to new replies.

About this Topic