WordPress.org

Forums

Widgetized Sidebar not respecting the <!--more--> (2 posts)

  1. Anonymous
    Unregistered
    Posted 6 years ago #

    A website I am building is based on Pages, but I have a News section that is made up of posts. My goal is to show the last 3-5 posts in the sidebar.

    The widget sidebar allows me to do this, but it only shows the Titles. So I am editing the widgets.php file to show a few lines of the post in the sidebar... by adding this on line 908

    <?php the_content('Read the rest of this entry »'); ?>

    so it reads like this:

    <li><a href="<?php the_permalink() ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?> </a> - <?php the_content('Read the rest of this entry &raquo;'); ?></li>

    It's showing the whole post, and not cutting off at <!--more-->

    Does anyone know why this would happen, or, a better solution... a plugin to make this happen without hacking up the code?

  2. Anonymous
    Unregistered
    Posted 6 years ago #

    After some more digging, it appears the <!--more--> tag is not working at all.

Topic Closed

This topic has been closed to new replies.

About this Topic