Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ridshack

    (@ridshack)

    For anyone else who want to have a page show you the_excerpt() by default on any single page and then be able to click a more link to see the rest of the article without leaving the same page.

    This code needs to go in your loop.

    <! Notice im appending &contentType=1 to the permalink() URL />
    
    <h2><a href="<?php the_permalink(); ?>&contentType=1" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    
    <! pull contentType=1 into the $content variable. />
    
    <?php $content = $_GET[contentType]; ?>
    
    <! show the page with full content because $content==1 />
    <?php
    if ($content==1)
    	the_content();
    else
        the_excerpt_rereloaded('80','More','<strong><em>','div');
    ?>

    I used the_excerpt_rereloaded plugin and modified the php plugin file to include &contentType=1 after the_permalink(); ?> so their more link appends to the URL also.

    You can use any excerpt plugin or built in function just by appending tot he permalink() as described.

    Good luck…

    Thread Starter ridshack

    (@ridshack)

    Ok, Im now starting to figure Im not using this the way it was intended. I think it is intended fro me to use the_excerpt on an archive page or something and then the more link is clicked Im sent to the actual full post page. Not what I want to do. Ill see if I can piece some code together.

Viewing 2 replies - 1 through 2 (of 2 total)