• This is for a anintimatestare.com, which I’m working on for the administrator.

    I recently got advice on setting up the category pages to display post excerpts instead of all of the entire posts. I was told to retrieve the relevant file, which was category.php, and replace “the_content” with “the_excerpt.”

    I retrieved the category.php file using FileZilla, but couldn’t fine “the_content” anywhere in it. I also couldn’t find “the_content” in the index.php file. I appreciate any help you can give.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    look for a call to get_template_part, as some of the processing may be passed off that way. The plugin “show current template” is an easy way to see what PHP files are used to generate pages.

    Thread Starter mirseidel

    (@mirseidel)

    Thanks. I did add that plugin, and it shows “category.php” on the category page.

    But I don’t see the call “get_template_part” anywhere in the category.php file either, or in the index.php file. I see “get_category,” “get_categories,” “get_tags,” “get_cat_ID” and “get_cat_name,” but nothing about templates.

    This is the Twenty Fourteen theme.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    get_template_part is in the category.php file. It branches you to content.php, assuming you’re not assigning a post format.

    In your child theme, edit content.php. Be sure to use a conditional, so when you view the post in full, it will use the content instead of the excerpt.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unable to replace posts with excerpts on category pages’ is closed to new replies.