• Hi, I’m currently using the following code in my index.php file to abbreviate posts in blog index view.
    <?php if(is_single()) {
    the_content();
    } else {
    the_excerpt();
    } ?>

    I would however like to make use of the “Split Posts With More Tag” option which requires this code:

    <?php the_content(__('(more...)')); ?>

    How can I combine the two? As my simplistic php code doesn’t work ??

    <?php if(is_single()) {
    the_content(__('(more...)'));
    } else {
    the_excerpt(__('(more...)'));
    } ?>

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try
    <?php if(is_single()) {
    the_content(__('(more...)'));
    } else {
    the_excerpt();
    } ?>

    instead. the_excerpt does not have any parameters:
    Template_Tags/the_content
    Template_Tags/the_excerpt

    Also, the_content should default to (more...), so your orignal code should work fine.

    Thread Starter checksum

    (@checksum)

    I had already tried this:

    <?php if(is_single()) {
    the_content(__('(more...)'));
    } else {
    the_excerpt();
    } ?>

    “Also, the_content should default to (more…), so your orignal code should work fine.”

    It’s not working, If I replace my code with:

    <?php the_content(__('(more...)')); ?>

    It works. Peculiar.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using Split Posts With More Tag’ is closed to new replies.