WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] the_content() never works but just display [...] (4 posts)

  1. rgblog
    Member
    Posted 7 years ago #

    Hi, I've just started learning theme design and I created the first theme, which is based on Default theme.

    Then, I've noticed my the_content() tag in index.php doesn't work and just displays [...] without linking to the single post when you view category page and monthly archives page. I'm using a plugin called "sem-static-front" to put home page on the front.

    I've been reading some similar topics already been discussed but no luck so far.

    I made sure the_content() tag is located within the loop. I've already tried putting <?php the_content(__('(more...)')); ?> instead of <?php the_content(); ?> but no luck.

    When I swithed the theme to default, there's no problem. So, I don't think it's caused by my blog setting at admin panel. You can see the problematic page here at http://endunham.com/eng/?m=200608 or http://endunham.com/eng/?cat=1

    Anyone can help me, please?
    Thanks,

    P.S. I'm using version 2.0.4.

  2. moshu
    Member
    Posted 7 years ago #

    None of those views are displayed by index - if your theme's structure (=templates files) goes as default goes.
    Learn: http://codex.wordpress.org/Template_Hierarchy

  3. drmike
    Member
    Posted 7 years ago #

    Someone needs to double check me on this but for both of those pages, it's not using the index.php page to display them. It's probably using the archive.php file.

    I think the issue also is WordPress isn't using the_content to display these pages but the_excerpt(); instead. You'll note that if you looked at the 200608 page, it doesn't display the thumbnail for the post labeled 'New CSS theme design' although it does display after you click through to it.

    I just think you're editing the wrong php file.

  4. rgblog
    Member
    Posted 7 years ago #

    Thanks for responding, moshu and drmike!
    I'll go try to edit archive.php to see the difference.

    I thought WordPress uses index.php at default unless I create other templates such as category.php etc... I've read it in "The _Loop_in_Action". Hummm, I might have misunderstood it :-(

Topic Closed

This topic has been closed to new replies.

About this Topic