• I use Arclite theme for my WP blog. I have set a front page as ‘Articles’ and set front page to display excerpts-to show 20 posts. There is no active ‘more’ link that users can click to go to the rest of the post. In the index.php template, the code appears like this: ‘<?php if(get_arclite_option(‘post_preview’)==’excerpt’) the_excerpt(); else the_content(__(‘Read the rest of this entry »’, ‘arclite’)); ?>’. Please see the page: http://www.evolve-forever.com/articles/. How can I create link to ‘Read the rest of this entry’?

    Thanks for help

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter pushhyarag2000

    (@pushhyarag2000)

    Thanks, first.

    I tried placing the suggested code in index.php</>. It doesn’t seem to work. In fact as it existed the excerpt ends with the string […]. So I tried putting in the other piece of code suggested under the same forum post ‘Function Reference’. Not successful. Have I placed the code at the right place? The total code after placement appears like this in my index.php</>:

    ‘ $output .= ‘<div class=”post-content clearfix”>’;
    $post_preview = get_arclite_option(‘post_preview’);

    if($post_preview==’excerpt’) $output .= get_the_excerpt(); else $output .= get_the_content(__(‘Read the rest of this entry »’, ‘arclite’));
    function new_excerpt_more($more) {
    return ‘[…..]’;
    }
    add_filter(‘excerpt_more’, ‘new_excerpt_more’);
    function new_excerpt_more($more) {
    global $post;
    return ‘ID) . ‘”>Read the Rest…‘;
    }
    add_filter(‘excerpt_more’, ‘new_excerpt_more’);
    $output .= ‘</div>’;’

    Does it help to help me further?

    Thanks.

    Thread Starter pushhyarag2000

    (@pushhyarag2000)

    Sorry, I’ve placed the code in functions.php; wriongly mentioned index.phpin the reply. :p

    please mark the code with backticks or the ‘code’ button to keep it readable.

    it looks as if you unneccessarily mixed some code together.

    you would only need to add this section to functions.php of your theme:

    add_filter('excerpt_more', 'new_excerpt_more');
    function new_excerpt_more($more) {
    ...
    ...
    }
    add_filter('excerpt_more', 'new_excerpt_more');

    and leave the code in index.php unchanged:

    Thread Starter pushhyarag2000

    (@pushhyarag2000)

    Thanks again. Since I have no good knowledge of code, I wasn’t sure about the exact location of your code placement on my template. Moreover, I’m not sure if the Arclite theme template code is different. Hence I had to use a plug in which helped me get what I wanted. You may see it at http://www.evolve-forever.com/articles.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Read More Link on Index Page’ is closed to new replies.